self.bot.trigger() relaying - needed for write loop notification cross-network

This commit is contained in:
jesopo 2019-06-22 12:46:56 +01:00
parent 3eac36d0f5
commit a7c338c1a9

View file

@ -38,7 +38,10 @@ class Module(ModuleManager.BaseModule):
message = utils.irc.protocol.privmsg(other_channel.name, message = utils.irc.protocol.privmsg(other_channel.name,
relay_message) relay_message)
server._relay_ignore.append(message.id) server._relay_ignore.append(message.id)
server.send(message) self.bot.trigger(self._send_factory(server, message))
def _send_factory(self, server, message):
return lambda: server.send(message)
def _has_relay_for(self, channel, server_id, channel_name): def _has_relay_for(self, channel, server_id, channel_name):
relays = self._get_relays(channel) relays = self._get_relays(channel)