Mitch528
3/30/2014 - 4:13 PM

SharpStar Example Plugin

SharpStar Example Plugin

from SharpStar.Lib.Plugins import PyPlugin

class testplugin(PyPlugin):

	def on_load(self):
		self.subscribe_to_event('afterConnectionResponse', 'after_conn_response')

	def on_unload(self):
		pass

	def after_conn_response(self, packet, client):
		client.SendChatMessage('Server', 'Welcome ' + client.Server.Player.Name + '!')