Dice: expose do_roll as XML-RPC method "dice_roll"

This commit is contained in:
Brian S. Stephan 2012-03-30 17:54:42 -05:00
parent 60b7a33f7b
commit 2e1bc8d5e0
1 changed files with 7 additions and 0 deletions

View File

@ -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)