From b7f3e6a082523dd4e667aad6b8270255993d8cc1 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 5 Apr 2015 13:21:38 -0700 Subject: [PATCH] RelayNext: get channel value correctly in _format() --- RelayNext/plugin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/RelayNext/plugin.py b/RelayNext/plugin.py index c49fe8b..4b528bc 100644 --- a/RelayNext/plugin.py +++ b/RelayNext/plugin.py @@ -131,11 +131,10 @@ class RelayNext(callbacks.Plugin): results.append(cn[0]) return results - def _format(self, irc, msg, announcement=False): + def _format(self, irc, msg, channel, announcement=False): s = '' nick = msg.nick userhost = '' - channel = msg.args[0] noHighlight = self.registryValue('noHighlight', channel) useHostmask = self.registryValue('hostmasks', channel) color = self.registryValue('color', channel) @@ -219,7 +218,7 @@ class RelayNext(callbacks.Plugin): # Get the source channel source = "%s@%s" % (channel, irc.network) source = source.lower() - out_s = self._format(irc, msg) + out_s = self._format(irc, msg, channel) if out_s: ### Begin Flood checking clause if self.registryValue("antiflood.enable", channel): @@ -239,7 +238,7 @@ class RelayNext(callbacks.Plugin): e = format("Flood detected on %s (%s %ss/%s seconds), " "not relaying %ss for %s seconds!", channel, maximum, c, seconds, c, timeout) - out_s = self._format(irc, msg, announcement=e) + out_s = self._format(irc, msg, channel, announcement=e) self.log.info("RelayNext (%s): %s", irc.network, e) self.floodTriggered = True else: