tighten up the regexes since we only use integer IDs for operations.

i'd originally intended to use strings, too, but never decided on
if there should be a game name, or the commands should search
something, or what, so i'll just quit waffling and remove it. numbers
only for now.
This commit is contained in:
Brian S. Stephan 2011-01-09 10:12:27 -06:00
parent 90d38c1741
commit 95e7a243d1
1 changed files with 4 additions and 4 deletions

View File

@ -72,12 +72,12 @@ class Storycraft(Module):
Module.__init__(self, irc, config, server)
rootcommand = '^!storycraft'
statuspattern = rootcommand + '\s+status(\s+(\S+)$|$)'
statuspattern = rootcommand + '\s+status(\s+(\d+)$|$)'
newgamepattern = rootcommand + '\s+new\s+game(\s+with\s+config\s+(.*)$|$)'
joingamepattern = rootcommand + '\s+join\s+game\s+(\S+)$'
joingamepattern = rootcommand + '\s+join\s+game\s+(\d+)$'
listgamespattern = rootcommand + '\s+list\s+games\s+(open|in\s+progress)$'
startgamepattern = rootcommand + '\s+start\s+game\s+(\S+)$'
addlinepattern = rootcommand + '\s+game\s+(\S+)\s+add\s+line\s+(.*)$'
startgamepattern = rootcommand + '\s+start\s+game\s+(\d+)$'
addlinepattern = rootcommand + '\s+game\s+(\d+)\s+add\s+line\s+(.*)$'
self.statusre = re.compile(statuspattern)
self.newgamere = re.compile(newgamepattern)