Search shim, and an encoding fix.

This commit is contained in:
Sean B. Palmer
2011-06-17 16:49:37 +01:00
parent 78ec273046
commit 12c8cd07f5
4 changed files with 17 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ def hello(phenny, input):
greeting = random.choice(('Hi', 'Hey', 'Hello'))
punctuation = random.choice(('', '!'))
phenny.say(greeting + ' ' + input.nick + punctuation)
hello.rule = r'(?i)(hi|hello|hey) $nickname\b'
hello.rule = r'(?i)(hi|hello|hey) $nickname[ \t]*$'
def interjection(phenny, input):
phenny.say(input.nick + '!')