Mercurial > traipse_dev
diff orpg/networking/server_plugins.py @ 96:65c1604e7949 alpha
Traipse Alpha 'OpenRPG' {090924-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
00:
Update forwards to the 090909-02 Server code that now works.
New default Lobby Map, designed for Traipse. Feel free to change it.
Updates to Server GUI:
* Admin can Ban from Backend.
* Prework to modify Ban List in back end.
* Server GUI finds your Lobby Name
* New users default as Lurker unless a Role is set
New Addition to Chat Die Roll commands. Math Ordering. Ex. [(X+Y)dZ]. Currently does pairs only, no nesting either.
Cleaner TraipseSuiteAttention portability and clean up in Main (Beta!)
author | sirebral |
---|---|
date | Thu, 24 Sep 2009 02:05:08 -0500 |
parents | d1aff41c031b |
children | 06f10429eedc |
line wrap: on
line diff
--- a/orpg/networking/server_plugins.py Sat Sep 19 12:19:17 2009 -0500 +++ b/orpg/networking/server_plugins.py Thu Sep 24 02:05:08 2009 -0500 @@ -25,7 +25,6 @@ def initBase(self): self._startPlugins() - #Methods def _startPlugins(self): autoload = [] @@ -60,7 +59,6 @@ self._load(pluginData) #Write to the autoload file for this plugin - self.__plugins[pluginName].Activated = True self.__plugins[pluginName].start() @@ -68,13 +66,12 @@ if not self.__plugins.has_key(pluginName): #Print some error about invalid plugin return + pluginData = self.__plugins[pluginName] - self.__plugins[pluginName].stop() #Unload it self._unload(pluginData) - #Remove this plugin from the autoload file #Private Methods @@ -84,7 +81,10 @@ return ('plugins.' + self.__ptype + '.' + s2[0], s2[0]) def _unload(self, pluginData): - self.__plugins[pluginData.Name] = PluginData(pluginData.Name, pluginData.File, pluginData.Author, pluginData.Help) + self.__plugins[pluginData.Name] = PluginData(pluginData.Name, + pluginData.File, + pluginData.Author, + pluginData.Help) unload = [] mod = self._findModule(pluginData.File)[0] for key, module in sys.modules.iteritems(): @@ -115,8 +115,6 @@ def _getType(self): return self.__ptype - - #Properties Plugins = property(_getPlugins, None) Type = property(_getType, None) @@ -132,18 +130,15 @@ def preParseIncoming(self, xml_dom, data): sent = True errmsg = "" - for pluginName, pluginData in self.Plugins.iteritems(): if pluginData.Activated: xml_dom, data = pluginData.preParseIncoming(xml_dom, data) - return xml_dom, data def postParseIncoming(self, data): for pluginName, pluginData in self.Plugins.iteritems(): if pluginData.Activated: data = pluginData.postParseIncoming(data) - return data def getPlayer(self): @@ -152,7 +147,6 @@ if pluginData.Activated: playerName = pluginData.addPlayer(data) players.append(playerName) - return players def setPlayer(self, playerData): @@ -161,7 +155,6 @@ if pluginData.Activated: playerName = pluginData.addPlayer(data) players.append(playerName) - return def preParseOutgoing(self): @@ -171,7 +164,6 @@ xml = pluginData.preParseOutgoing() for msg in xml: data.append(msg) - return data def postParseOutgoing(self): @@ -181,7 +173,6 @@ xml = pluginData.postParseOutgoing() for msg in xml: data.append(msg) - return data __key = _SingletonKey()