diff --git a/DrBotIRC.py b/DrBotIRC.py index 2063ace..d75e0b3 100644 --- a/DrBotIRC.py +++ b/DrBotIRC.py @@ -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)