DrBotIRC: add method to register a function to the XML-RPC server
this appears to be safe to do while the other thread is doing serve_forever()
This commit is contained in:
parent
05a3bd0af7
commit
e16d698d0e
|
@ -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."""
|
||||
|
||||
|
|
Loading…
Reference in New Issue