Add message alert functionality to the phenny bot.

When a user joins a channel, and has messages waiting for them, alert
them.
master
Reese Moore 2011-04-18 14:52:43 -04:00
parent 99c0cc2829
commit 60b4bd875b
1 changed files with 7 additions and 0 deletions

View File

@ -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()