diff options
-rw-r--r-- | plugins/amsg.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/amsg.py b/plugins/amsg.py new file mode 100644 index 00000000..697f793f --- /dev/null +++ b/plugins/amsg.py @@ -0,0 +1,13 @@ +# 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: /amsg <message>\nAmsg: 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) |