Add a /amsg plugin
This commit is contained in:
parent
5593fabe6c
commit
e47c8d3c19
1 changed files with 13 additions and 0 deletions
13
plugins/amsg.py
Normal file
13
plugins/amsg.py
Normal file
|
@ -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)
|
Loading…
Reference in a new issue