diff --git a/README.md b/README.md index 2896233..46be1bd 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Most of these plugins also have their own READMEs in their folders; you can usua - A small random name generator. ##### [OperUp](OperUp/README.md) -- Allows Supybot to oper up automatically (on connect) and on demand. +- Allows Supybot to oper up on configured networks, automatically (on connect) and on demand. ##### PassGen - Generates random passwords on the fly! @@ -71,7 +71,6 @@ Most of these plugins also have their own READMEs in their folders; you can usua - Looks up commonly used UDP and TCP port numbers from Wikipedia: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers - **Requires:** [Beautiful Soup 4](http://www.crummy.com/software/BeautifulSoup/bs4/doc/) - ##### [RelayNext](RelayNext/README.md) - Next generation relayer plugin, designed with two-way relays in mind. diff --git a/RelayNext/plugin.py b/RelayNext/plugin.py index 5efbb41..0624d4d 100644 --- a/RelayNext/plugin.py +++ b/RelayNext/plugin.py @@ -92,7 +92,7 @@ class RelayNext(callbacks.Plugin): # This part facilitates flood protection self.msgcounters = {} - self.floodTriggered = False + self.floodTriggered = {} self.db = {} self.loadDB() @@ -236,17 +236,17 @@ class RelayNext(callbacks.Plugin): if len(self.msgcounters[(source, msg.command)]) > maximum: self.log.debug("RelayNext (%s): message from %s blocked by " "flood protection.", irc.network, channel) - if self.floodTriggered: + if self.floodTriggered.get((source, msg.command)): return c = msg.command.lower() 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, channel, announcement=e) - self.floodTriggered = True + self.floodTriggered[(source, msg.command)] = True self.log.info("RelayNext (%s): %s", irc.network, e) else: - self.floodTriggered = False + self.floodTriggered[(source, msg.command)] = False for cn in targets: target, net = cn.split("@") otherIrc = world.getIrc(net)