3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

p10: acknowledge incoming KICKs with a PART

Per https://github.com/evilnet/nefarious2/blob/ed12d64/doc/p10.txt#L611-L616. This fixes autorejoin-on-kick not working with prefix modes because the remote verifies whether the KICK has been acknowledged properly. Closes #465.

(backported from commit 1996b86e85)
This commit is contained in:
James Lu 2017-06-02 08:09:19 -07:00
parent 5b73e0a691
commit 2217306ca1

View File

@ -1218,6 +1218,11 @@ class P10Protocol(IRCS2SProtocol):
kicked = args[1] kicked = args[1]
self.handle_part(kicked, 'KICK', [channel, args[2]]) self.handle_part(kicked, 'KICK', [channel, args[2]])
# Send PART in response to acknowledge the KICK, per
# https://github.com/evilnet/nefarious2/blob/ed12d64/doc/p10.txt#L611-L616
self._send(kicked, 'L %s :%s' % (channel, args[2]))
return {'channel': channel, 'target': kicked, 'text': args[2]} return {'channel': channel, 'target': kicked, 'text': args[2]}
def handle_topic(self, source, command, args): def handle_topic(self, source, command, args):