Skip to content

Commit

Permalink
[announce] Update to 4.0 standard
Browse files Browse the repository at this point in the history
Issue sopel-irc#276
Also removed useless print
  • Loading branch information
Elad Alfassa committed May 31, 2013
1 parent 2783060 commit f841e3a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions announce.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
Licensed under the Eiffel Forum License 2.
"""
def announce(willie, trigger):
from willie.module import command, example

@command('announce')
@example('.announce Some important message here')
def announce(bot, 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')
bot.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'
for channel in bot.channels:
bot.msg(channel, '[ANNOUNCMENT] %s' % trigger.group(2))

0 comments on commit f841e3a

Please sign in to comment.