Facts: expose _get_fact as an XML-RPC method

This commit is contained in:
Brian S. Stephan 2012-03-30 10:19:16 -05:00
parent 71688f2389
commit 4253c83694
1 changed files with 7 additions and 0 deletions

View File

@ -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."""