diff options
author | mathieui <mathieui@mathieui.net> | 2012-02-07 01:12:21 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-02-07 01:12:21 +0100 |
commit | e47c8d3c197264c1749ca300c09165e54a1acb5c (patch) | |
tree | b4766f8bd31a17af079a3daaf88a1b188acb539f | |
parent | 5593fabe6c79dd5c6b44a48c004ea71e789d53aa (diff) | |
download | poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.gz poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.bz2 poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.tar.xz poezio-e47c8d3c197264c1749ca300c09165e54a1acb5c.zip |
Add a /amsg plugin
-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) |