Dice: only match !dice/!ctech at start of line

This commit is contained in:
Brian S. Stephan 2013-02-11 14:06:15 -06:00
parent 9b7cbadce6
commit 6a12763c81
1 changed files with 2 additions and 2 deletions

View File

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