From e47c8d3c197264c1749ca300c09165e54a1acb5c Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 7 Feb 2012 01:12:21 +0100 Subject: Add a /amsg plugin --- plugins/amsg.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/amsg.py 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 \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) -- cgit v1.2.3