summaryrefslogtreecommitdiff
path: root/plugins/amsg.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-02-15 20:10:00 +0100
committerFlorent Le Coz <louiz@louiz.org>2012-02-15 20:10:00 +0100
commit695a7ebebaf6a277420dcb42cd96d92d77df0379 (patch)
tree8c9da1e5bf988356ad110f42113949aab94a5866 /plugins/amsg.py
parent0606c2b351ac87f110e1240d2f4ba1b94b275930 (diff)
parentb89cd8fd8322bf8aa23130398a0a70defcba708d (diff)
downloadpoezio-695a7ebebaf6a277420dcb42cd96d92d77df0379.tar.gz
poezio-695a7ebebaf6a277420dcb42cd96d92d77df0379.tar.bz2
poezio-695a7ebebaf6a277420dcb42cd96d92d77df0379.tar.xz
poezio-695a7ebebaf6a277420dcb42cd96d92d77df0379.zip
Merge branch 'master' of https://git.louiz.org/poezio
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)