From 4253c83694c7c087834164cafd71ff4536dc2faa Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 30 Mar 2012 10:19:16 -0500 Subject: [PATCH] Facts: expose _get_fact as an XML-RPC method --- modules/Facts.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/Facts.py b/modules/Facts.py index b66771a..0be6d9c 100644 --- a/modules/Facts.py +++ b/modules/Facts.py @@ -31,6 +31,13 @@ class Facts(Module): Facts are categorized by a name, which may allow for random selection and so on. """ + def __init__(self, irc, config, server): + """Set up XML-RPC methods.""" + + Module.__init__(self, irc, config, server) + + irc.xmlrpc_register_function(self._get_fact, "facts_get") + def db_init(self): """Initialize database tables."""