From 6a12763c81979685cdc109dea3266225a1a7fab7 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Mon, 11 Feb 2013 14:06:15 -0600 Subject: [PATCH] Dice: only match !dice/!ctech at start of line --- modules/Dice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Dice.py b/modules/Dice.py index 63e1de2..987b575 100644 --- a/modules/Dice.py +++ b/modules/Dice.py @@ -287,7 +287,7 @@ class Dice(Module): return self.get_result() def do(self, connection, event, nick, userhost, what, admin_unlocked): - match = re.search('!roll\s+(.*)$', what) + match = re.search('^!roll\s+(.*)$', what) if match: dicestr = match.group(1) reply = nick + ": " + self.do_roll(dicestr) @@ -295,7 +295,7 @@ class Dice(Module): return self.irc.reply(event, re.sub(r"(\d+)(.*?\s+)(\(.*?\))", r"\1\214\3", reply)) - match = re.search('!ctech\s+(.*)$', what) + match = re.search('^!ctech\s+(.*)$', what) if match: rollitrs = re.split(';\s*', match.group(1)) reply = ""