allow roll strings on IRC to have an 'a' natural language prefix

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
2026-07-25 07:27:20 -05:00
parent 59d462fcd0
commit 2cdb6feb44
+2 -2
View File
@@ -24,7 +24,7 @@ class Dice(Plugin):
def start(self):
"""Set up the handlers."""
self.connection.reactor.add_global_regex_handler(['pubmsg', 'privmsg'], r'^!roll\s+(.*)$',
self.connection.reactor.add_global_regex_handler(['pubmsg', 'privmsg'], r'^!roll(\s+a)?\s+(.*)$',
self.handle_roll, -20)
self.connection.reactor.add_global_regex_handler(['pubmsg', 'privmsg'], r'^!random\s+(.*)$',
self.handle_random, -20)
@@ -76,7 +76,7 @@ class Dice(Plugin):
def handle_roll(self, connection, event, match):
"""Handle the !roll command which covers most common dice stuff."""
nick = NickMask(event.source).nick
dicestr = match.group(1)
dicestr = match.group(2)
logger.debug(event.recursing)
try: