diff --git a/announce.py b/announce.py new file mode 100644 index 0000000000..58733890a2 --- /dev/null +++ b/announce.py @@ -0,0 +1,19 @@ +# -*- coding: utf8 -*- +""" +announce.py - Send a message to all channels +Copyright © 2013, Elad Alfassa, +Licensed under the Eiffel Forum License 2. + +""" +def announce(willie, trigger): + """ + Send an announcement to all channels the bot is in + """ + if not trigger.admin: + willie.reply('Sorry, I can\'t let you do that') + return + print willie.channels + for channel in willie.channels: + willie.msg(channel, '[ANNOUNCMENT] %s' % trigger.group(2)) +announce.commands = ['announce'] +announce.example = '.announce Some important message here'