equal
deleted
inserted
replaced
57 |
57 |
58 def sendEvent (self, event) : |
58 def sendEvent (self, event) : |
59 self.send("[%s.%s] %s" % (event.module.name, event.type, event.msg)) |
59 self.send("[%s.%s] %s" % (event.module.name, event.type, event.msg)) |
60 |
60 |
61 def moduleConnected (self, module, addr) : |
61 def moduleConnected (self, module, addr) : |
62 self.send("{modules.%s} connected from %s:%d, version %s" % (module.name, addr.host, addr.port, module.version)) |
62 self.send("{modules.%s} connected from %s" % (module.name, addr)) |
63 |
63 |
64 def moduleDisconnected (self, module, reason) : |
64 def moduleDisconnected (self, module, reason) : |
65 self.send("{modules.%s} disconnected: %s" % (module.name, reason)) |
65 self.send("{modules.%s} disconnected: %s" % (module.name, reason)) |
66 |
66 |
67 class _noDefault : pass |
67 class _noDefault : pass |
110 return method.__doc__ |
110 return method.__doc__ |
111 else : |
111 else : |
112 try : |
112 try : |
113 module, addr = self.nexus.getModuleInfo(cmd) |
113 module, addr = self.nexus.getModuleInfo(cmd) |
114 |
114 |
115 return "%s is version %d from %s:%d. Events: %s. See `commands %s' for a list of commands" % (module.name, module.version, addr.host, addr.port, ', '.join(module.event_types), module.name) |
115 return "%s from %s. Events: %s. See `commands %s' for a list of commands" % (module.name, addr, ', '.join(module.event_types), module.name) |
116 |
116 |
117 except KeyError : |
117 except KeyError : |
118 raise ReplyException("No command/module called `%s'. See `help commands'" % cmd) |
118 raise ReplyException("No command/module called `%s'. See `help commands'" % cmd) |
119 |
119 |
120 def cmd_commands (self, module=None) : |
120 def cmd_commands (self, module=None) : |