3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

relay: don't relay kicks to service bots

This commit is contained in:
James Lu 2016-05-14 16:24:26 -07:00
parent 1816de307d
commit 75798b5fba

View File

@ -969,9 +969,11 @@ def handle_kick(irc, source, command, args):
text = args['text']
kicker = source
relay = getRelay((irc.name, channel))
# Don't allow kicks to the PyLink client to be relayed.
if relay is None or target == irc.pseudoclient.uid:
# Don't relay kicks to protected service bots.
if relay is None or irc.isServiceBot(target):
return
origuser = getOrigUser(irc, target)
for name, remoteirc in world.networkobjects.copy().items():
if irc.name == name or not remoteirc.connected.is_set():