Fixed the .commandr bug.

This commit is contained in:
Sean B. Palmer
2010-01-19 14:52:37 +00:00
parent f5ef55769e
commit 3e300c4357
3 changed files with 8 additions and 55 deletions

2
bot.py
View File

@@ -127,7 +127,7 @@ class Phenny(irc.Bot):
prefix = self.config.prefix
commands, pattern = func.rule
for command in commands:
command = r'(%s)(?: +(?:%s))?' % (command, pattern)
command = r'(%s)\b(?: +(?:%s))?' % (command, pattern)
regexp = re.compile(prefix + command)
bind(self, func.priority, regexp, func)