Mercurial > traipse
comparison plugins/xxcherrypy.py @ 18:97265586402b ornery-orc
Traipse 'OpenRPG' {090827-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:
Update Manager is now in version 0.8. While not every button works, users can now browse the different revisions and their different changesets. The code has been refined some with feature from Core added to it. A Crash report is now created if the users software crashes. Update Manager has been moved to the Traipse Suite menu item, and a Debug Console as been added as well.
author | sirebral |
---|---|
date | Thu, 27 Aug 2009 01:04:43 -0500 |
parents | d492f137cd3c |
children |
comparison
equal
deleted
inserted
replaced
17:265b987cce4f | 18:97265586402b |
---|---|
53 if cherry_start == "on": self.on_cherrypy("on") | 53 if cherry_start == "on": self.on_cherrypy("on") |
54 else: pass | 54 else: pass |
55 del cherry_start | 55 del cherry_start |
56 | 56 |
57 self.cherryhost = 'http://' + self.host + ':' + str(self.port) + '/webfiles/' | 57 self.cherryhost = 'http://' + self.host + ':' + str(self.port) + '/webfiles/' |
58 open_rpg.add_component("cherrypy", self.cherryhost) | 58 component.add("cherrypy", self.cherryhost) |
59 | 59 |
60 def plugin_disabled(self): | 60 def plugin_disabled(self): |
61 #Here you need to remove any commands you added, and anything else you want to happen when you disable the plugin | 61 #Here you need to remove any commands you added, and anything else you want to happen when you disable the plugin |
62 #such as closing windows created by the plugin | 62 #such as closing windows created by the plugin |
63 self.plugin_removecmd('/cherrypy') | 63 self.plugin_removecmd('/cherrypy') |
64 if self.isServerRunning == 'on': | 64 if self.isServerRunning == 'on': |
65 server.stop() | 65 server.stop() |
66 self.isServerRunning = 'off' | 66 self.isServerRunning = 'off' |
67 else: | 67 else: |
68 pass | 68 pass |
69 open_rpg.del_component("cherrypy") | 69 component.delete("cherrypy") |
70 | 70 |
71 def on_cherrypy(self, cmdargs): | 71 def on_cherrypy(self, cmdargs): |
72 args = cmdargs.split(None,-1) | 72 args = cmdargs.split(None,-1) |
73 | 73 |
74 if len(args) == 0 or args[0] == 'status': | 74 if len(args) == 0 or args[0] == 'status': |
94 return | 94 return |
95 self.port = int(args[1]) | 95 self.port = int(args[1]) |
96 self.plugindb.SetString("xxcherrypy", "port", str(self.port)) # TAS | 96 self.plugindb.SetString("xxcherrypy", "port", str(self.port)) # TAS |
97 self.chat.InfoPost("CherryPy Web Server is currently: " + self.isServerRunning) | 97 self.chat.InfoPost("CherryPy Web Server is currently: " + self.isServerRunning) |
98 self.cherryhost = 'http://' + self.host + ':' + str(self.port) + '/webfiles/' | 98 self.cherryhost = 'http://' + self.host + ':' + str(self.port) + '/webfiles/' |
99 open_rpg.del_component("cherrypy"); open_rpg.add_component("cherrypy", self.cherryhost) | 99 component.delete("cherrypy"); component.add("cherrypy", self.cherryhost) |
100 self.chat.InfoPost('CherryPy Web Server address is: ' + self.cherryhost) | 100 self.chat.InfoPost('CherryPy Web Server address is: ' + self.cherryhost) |
101 | 101 |
102 def startServer(self, port): | 102 def startServer(self, port): |
103 try: | 103 try: |
104 if self.host == 0: | 104 if self.host == 0: |