From 77ada246c7d2d3e1f6f92c21565f5c6e4ce58457 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 4 Jan 2013 10:13:57 -0600 Subject: [PATCH] Module: stub out xmlrpc_init() similar to db_init(), create a stub xmlrpc_init() that's called during module initialization, for doing XML-RPC setup stuff --- Module.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Module.py b/Module.py index 878cf99..0579d9d 100644 --- a/Module.py +++ b/Module.py @@ -56,6 +56,9 @@ class Module(object): # set up database for this module self.db_init() + # set up XML-RPC for this module + self.xmlrpc_init() + self.log.info("Loaded " + self.__class__.__name__) def register_handlers(self): @@ -275,6 +278,15 @@ class Module(object): pass + def xmlrpc_init(self): + """Set up XML-RPC handlers. + + Modules interested in this should implement registration here. + + """ + + pass + def do(self, connection, event, nick, userhost, what, admin): """Do the primary thing this module was intended to do, in most cases.