From 2217306ca1147d4c14638c330b39772e4bbfc337 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 2 Jun 2017 08:09:19 -0700 Subject: [PATCH] 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 1996b86e85aff5ba0465445574f9ff7e91b18034) --- protocols/nefarious.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protocols/nefarious.py b/protocols/nefarious.py index 9b47daa..aa3384f 100644 --- a/protocols/nefarious.py +++ b/protocols/nefarious.py @@ -1218,6 +1218,11 @@ class P10Protocol(IRCS2SProtocol): kicked = args[1] 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]} def handle_topic(self, source, command, args):