poezio/plugins/amsg.py
mathieui e1956533a6 Fix #2231 (update the plugins to use the new help system)
And fix some imprecisions/mistakes in the help.
2013-03-01 19:25:31 +01:00

16 lines
500 B
Python

# A simple broadcast plugin
from plugin import BasePlugin
from tabs import MucTab
class Plugin(BasePlugin):
def init(self):
self.add_command('amsg', self.command_amsg,
usage='<message>',
short='Broadcast a message',
help='Broadcast the message to all the joined rooms.')
def command_amsg(self, args):
for room in self.core.tabs:
if isinstance(room, MucTab) and room.joined:
room.command_say(args)