From 60b4bd875b0120512fb757f008a50d236366635d Mon Sep 17 00:00:00 2001 From: Reese Moore Date: Mon, 18 Apr 2011 14:52:43 -0400 Subject: [PATCH] Add message alert functionality to the phenny bot. When a user joins a channel, and has messages waiting for them, alert them. --- modules/tell.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/tell.py b/modules/tell.py index 5e61007..b8bb6ad 100755 --- a/modules/tell.py +++ b/modules/tell.py @@ -147,5 +147,12 @@ def message(phenny, input): message.rule = r'(.*)' message.priority = 'low' +def messageAlert(phenny, input): + if (input.nick.lower() in phenny.reminders.keys()): + phenny.say(input.nick + ': You have messages.') +messageAlert.event = 'JOIN' +messageAlert.rule = r'.*' +messageAlert.priority = 'low' + if __name__ == '__main__': print __doc__.strip()