summaryrefslogtreecommitdiff
path: root/plugins/amsg.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-02-07 01:12:21 +0100
committermathieui <mathieui@mathieui.net>2012-02-07 01:12:21 +0100
commite47c8d3c197264c1749ca300c09165e54a1acb5c (patch)
treeb4766f8bd31a17af079a3daaf88a1b188acb539f /plugins/amsg.py
parent5593fabe6c79dd5c6b44a48c004ea71e789d53aa (diff)
downloadpoezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.gz
poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.bz2
poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.xz
poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.zip
Add a /amsg plugin
Diffstat (limited to 'plugins/amsg.py')
-rw-r--r--plugins/amsg.py13
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)