diff --git a/DrBotIRC.py b/DrBotIRC.py index 6f88362..d473716 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -196,6 +196,13 @@ class DrBotIRC(irclib.IRC): except Exception as e: print("exception floated up to DrBotIrc: " + str(e)) + def xmlrpc_register_function(self, func, name): + """Add a method to the XML-RPC interface.""" + + if func: + if hasattr(func, '__call__'): + self.xmlrpc.register_function(func, name) + def _xmlrpc_listen(self): """Begin listening. Hopefully this was called in a new thread."""