3
0
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:
James Lu 2016-12-27 22:09:16 -08:00
parent 59f232d69f
commit f1da5c57e8

View File

@ -784,6 +784,8 @@ class ClientbotWrapperProtocol(Protocol):
except KeyError:
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}])
# Delete channels that we were kicked from, for better state keeping.