From 2e1bc8d5e0d84080c76ffbbd6579096ff88f63dd Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 30 Mar 2012 17:54:42 -0500 Subject: [PATCH] Dice: expose do_roll as XML-RPC method "dice_roll" --- modules/Dice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/Dice.py b/modules/Dice.py index 88b4da4..3c8e4cd 100644 --- a/modules/Dice.py +++ b/modules/Dice.py @@ -34,6 +34,13 @@ class Dice(Module): tokens = ['NUMBER', 'TEXT', 'ROLLSEP'] literals = ['#', '/', '+', '-', 'd'] + def __init__(self, irc, config, server): + """Set up XML-RPC methods.""" + + Module.__init__(self, irc, config, server) + + irc.xmlrpc_register_function(self.do_roll, "dice_roll") + def build(self): lex.lex(module=self) yacc.yacc(module=self)