mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
clientbot: don't repeat KICK hooks if the source is internal
This prevents KICK events from being relayed twice to Clientbot links, when the kicked user is also a Clientbot user.
This commit is contained in:
parent
59f232d69f
commit
f1da5c57e8
@ -784,7 +784,9 @@ class ClientbotWrapperProtocol(Protocol):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
self.irc.callHooks([source, 'KICK', {'channel': channel, 'target': target, 'text': reason}])
|
||||
if (not self.irc.isInternalClient(source)) and not self.irc.isInternalServer(source):
|
||||
# Don't repeat hooks if we're the kicker.
|
||||
self.irc.callHooks([source, 'KICK', {'channel': channel, 'target': target, 'text': reason}])
|
||||
|
||||
# Delete channels that we were kicked from, for better state keeping.
|
||||
if self.irc.pseudoclient and target == self.irc.pseudoclient.uid:
|
||||
|
Loading…
Reference in New Issue
Block a user