From 1aa7a542f2eed1667c377732ab28abbd848d8ef1 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 30 Mar 2012 17:25:46 -0500 Subject: [PATCH] DrBotIRC: only register a function if there's an xmlrpc server loaded --- DrBotIRC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)