mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
relay: treat forced parts to clientbot as clearchan
This commit is contained in:
parent
0db9d4e69e
commit
08525e8eba
@ -943,7 +943,18 @@ def handle_part(irc, numeric, command, args):
|
|||||||
text = args['text']
|
text = args['text']
|
||||||
# Don't allow the PyLink client PARTing to be relayed.
|
# Don't allow the PyLink client PARTing to be relayed.
|
||||||
if numeric == irc.pseudoclient.uid:
|
if numeric == irc.pseudoclient.uid:
|
||||||
|
# For clientbot: treat forced parts to the bot as clearchan, and atetmpt to rejoin after.
|
||||||
|
if irc.protoname == 'clientbot':
|
||||||
|
for channel in channels:
|
||||||
|
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,
|
||||||
|
'text': 'Clientbot force parted from channel.', 'parse_as': 'KICK'}])
|
||||||
|
irc.proto.join(irc.pseudoclient.uid, channel)
|
||||||
|
|
||||||
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
for channel in channels:
|
for channel in channels:
|
||||||
for netname, user in relayusers[(irc.name, numeric)].copy().items():
|
for netname, user in relayusers[(irc.name, numeric)].copy().items():
|
||||||
remoteirc = world.networkobjects[netname]
|
remoteirc = world.networkobjects[netname]
|
||||||
|
Loading…
Reference in New Issue
Block a user