mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-03 08:51:13 -05:00
RelayNext: get channel value correctly in _format()
This commit is contained in:
parent
0b96855a27
commit
b7f3e6a082
@ -131,11 +131,10 @@ class RelayNext(callbacks.Plugin):
|
|||||||
results.append(cn[0])
|
results.append(cn[0])
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def _format(self, irc, msg, announcement=False):
|
def _format(self, irc, msg, channel, announcement=False):
|
||||||
s = ''
|
s = ''
|
||||||
nick = msg.nick
|
nick = msg.nick
|
||||||
userhost = ''
|
userhost = ''
|
||||||
channel = msg.args[0]
|
|
||||||
noHighlight = self.registryValue('noHighlight', channel)
|
noHighlight = self.registryValue('noHighlight', channel)
|
||||||
useHostmask = self.registryValue('hostmasks', channel)
|
useHostmask = self.registryValue('hostmasks', channel)
|
||||||
color = self.registryValue('color', channel)
|
color = self.registryValue('color', channel)
|
||||||
@ -219,7 +218,7 @@ class RelayNext(callbacks.Plugin):
|
|||||||
# Get the source channel
|
# Get the source channel
|
||||||
source = "%s@%s" % (channel, irc.network)
|
source = "%s@%s" % (channel, irc.network)
|
||||||
source = source.lower()
|
source = source.lower()
|
||||||
out_s = self._format(irc, msg)
|
out_s = self._format(irc, msg, channel)
|
||||||
if out_s:
|
if out_s:
|
||||||
### Begin Flood checking clause
|
### Begin Flood checking clause
|
||||||
if self.registryValue("antiflood.enable", channel):
|
if self.registryValue("antiflood.enable", channel):
|
||||||
@ -239,7 +238,7 @@ class RelayNext(callbacks.Plugin):
|
|||||||
e = format("Flood detected on %s (%s %ss/%s seconds), "
|
e = format("Flood detected on %s (%s %ss/%s seconds), "
|
||||||
"not relaying %ss for %s seconds!", channel,
|
"not relaying %ss for %s seconds!", channel,
|
||||||
maximum, c, seconds, c, timeout)
|
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.log.info("RelayNext (%s): %s", irc.network, e)
|
||||||
self.floodTriggered = True
|
self.floodTriggered = True
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user