Dice: allow !roll/!ctech strings anywhere, not just at the start of the line

This commit is contained in:
Brian S. Stephan 2012-03-19 00:11:56 -05:00
parent 341066a0ba
commit ce93480e9b
1 changed files with 2 additions and 2 deletions

View File

@ -265,7 +265,7 @@ class Dice(Module):
return output
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)
self.build()
@ -274,7 +274,7 @@ class Dice(Module):
if reply is not "":
return self.reply(connection, event, nick + ': ' + reply)
match = re.search('^!ctech\s+(.*)$', what)
match = re.search('!ctech\s+(.*)$', what)
if match:
rollitrs = re.split(';\s*', match.group(1))
reply = ""