mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Made throttling work correctly.
This commit is contained in:
parent
bb74f518a1
commit
a10900da83
@ -137,10 +137,15 @@ class Herald(callbacks.Privmsg, configurable.Mixin):
|
|||||||
i = self.configurables.get('throttle-after-part', channel)
|
i = self.configurables.get('throttle-after-part', channel)
|
||||||
if now - self.lastParts[(id, channel)] < i:
|
if now - self.lastParts[(id, channel)] < i:
|
||||||
return
|
return
|
||||||
|
self.lastHerald[(id, channel)] = now
|
||||||
irc.queueMsg(ircmsgs.privmsg(channel, herald))
|
irc.queueMsg(ircmsgs.privmsg(channel, herald))
|
||||||
|
|
||||||
def doPart(self, irc, msg):
|
def doPart(self, irc, msg):
|
||||||
self.lastParts[(msg.prefix, msg.args[0])] = time.time()
|
try:
|
||||||
|
id = self._getId(msg.prefix)
|
||||||
|
self.lastParts[(id, msg.args[0])] = time.time()
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
def _getId(self, userNickHostmask):
|
def _getId(self, userNickHostmask):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user