From 1988662c0a75de517f14bae40322546c6ff79b1c Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Wed, 8 Sep 2010 22:22:43 -0500 Subject: [PATCH] have ^megahal$ trigger a no-input reply from the megahal module. mostly useful for chaining random bot nonsense into other commands --- modules/MegaHAL.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/MegaHAL.py b/modules/MegaHAL.py index 5b04d75..7dab317 100644 --- a/modules/MegaHAL.py +++ b/modules/MegaHAL.py @@ -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)