mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +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)
|
||||
if now - self.lastParts[(id, channel)] < i:
|
||||
return
|
||||
self.lastHerald[(id, channel)] = now
|
||||
irc.queueMsg(ircmsgs.privmsg(channel, herald))
|
||||
|
||||
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):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user