mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
relay: limit auto-rejoin-on-part to relay channels
This commit is contained in:
parent
08525e8eba
commit
cadf0a336c
@ -943,9 +943,10 @@ def handle_part(irc, numeric, command, args):
|
||||
text = args['text']
|
||||
# Don't allow the PyLink client PARTing to be relayed.
|
||||
if numeric == irc.pseudoclient.uid:
|
||||
# For clientbot: treat forced parts to the bot as clearchan, and atetmpt to rejoin after.
|
||||
# For clientbot: treat forced parts to the bot as clearchan, and attempt to rejoin only
|
||||
# if it affected a relay.
|
||||
if irc.protoname == 'clientbot':
|
||||
for channel in channels:
|
||||
for channel in [c for c in channels if getRelay((irc.name, c))]:
|
||||
for user in irc.channels[channel].users:
|
||||
if (not irc.isInternalClient(user)) and (not isRelayClient(irc, user)):
|
||||
irc.callHooks([irc.sid, 'CLIENTBOT_SERVICE_KICKED', {'channel': channel, 'target': user,
|
||||
|
Loading…
Reference in New Issue
Block a user