# -*- coding: utf8 -*-
"""
announce.py - Send a message to all channels
Copyright © 2013, Elad Alfassa, <elad@fedoraproject.org>
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'

@@ -174,27 +174,139 @@
 %22%22%22%0A
-def announce(willie
+from willie.module import command, example%0A%0A@command('announce')%0A@example('.announce Some important message here')%0Adef announce(bot
 , tr
@@ -418,22 +418,19 @@
         
-willie
+bot
 .reply('
@@ -482,34 +482,8 @@
 urn%0A
-    print willie.channels%0A
     
@@ -497,22 +497,19 @@
 nnel in 
-willie
+bot
 .channel
@@ -519,22 +519,19 @@
         
-willie
+bot
 .msg(cha
@@ -579,96 +579,4 @@
 2))%0A
-announce.commands = %5B'announce'%5D%0Aannounce.example = '.announce Some important message here'%0A

Update to 4.0 standard