self.add_event_handler('muc::%s::got_online' % room, self.muc_online)
self._initialize_plugins()
+ self.muted = False
def _initialize_plugins(self):
self.register_plugin('xep_0045')
if msg['type'] in ('normal', 'chat', 'groupchat'):
message = msg['body']
+ if message == f"{self.nick}: mute":
+ self.muted = True
+ elif message == f"{self.nick}: unmute":
+ self.muted = False
+
if "hangup" in message:
self.disconnect()
self.initialize_actionworker()
self.echo("Worker One available for master.")
+ # TODO: still record stuff and react on things?
+ if self.muted:
+ return
+
nick_offset, routing_key = self.get_amqp_routing_key(self.nick, msg)
if msg["type"] == "groupchat":