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:
parent
90d38c1741
commit
95e7a243d1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue