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,6 +784,8 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
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}])
|
self.irc.callHooks([source, 'KICK', {'channel': channel, 'target': target, 'text': reason}])
|
||||||
|
|
||||||
# Delete channels that we were kicked from, for better state keeping.
|
# Delete channels that we were kicked from, for better state keeping.
|
||||||
|
Loading…
Reference in New Issue
Block a user