have ^megahal$ trigger a no-input reply from the megahal module.

mostly useful for chaining random bot nonsense into other commands
This commit is contained in:
Brian S. Stephan 2010-09-08 22:22:43 -05:00
parent d5c4750dd8
commit 1988662c0a
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,8 @@ class MegaHAL(Module):
append_nick = True
reply = self.megahal.get_reply(line)
elif re.search('^megahal$', line, re.IGNORECASE) is not None:
reply = self.megahal.get_reply_nolearn('')
else:
self.megahal.learn(line)