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):
|
def xmlrpc_register_function(self, func, name):
|
||||||
"""Add a method to the XML-RPC interface."""
|
"""Add a method to the XML-RPC interface."""
|
||||||
|
|
||||||
if func:
|
if func and self.xmlrpc:
|
||||||
if hasattr(func, '__call__'):
|
if hasattr(func, '__call__'):
|
||||||
self.xmlrpc.register_function(func, name)
|
self.xmlrpc.register_function(func, name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user