DrBotIRC: only register a function if there's an xmlrpc server loaded
This commit is contained in:
parent
731aec8c0c
commit
1aa7a542f2
@ -205,7 +205,7 @@ class DrBotIRC(irclib.IRC):
|
||||
def xmlrpc_register_function(self, func, name):
|
||||
"""Add a method to the XML-RPC interface."""
|
||||
|
||||
if func:
|
||||
if func and self.xmlrpc:
|
||||
if hasattr(func, '__call__'):
|
||||
self.xmlrpc.register_function(func, name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user