From b5188fd38a5ad939526bcb9fbc389859a019d8e4 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sun, 18 Jun 2023 19:31:53 -0400 Subject: [PATCH] Handle removing channels from the current list when kicked --- ircp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ircp.py b/ircp.py index ed2eaf9..684bf36 100644 --- a/ircp.py +++ b/ircp.py @@ -314,6 +314,12 @@ class probe: raise Exception(bad.error[check[0]]) elif args[0] == 'PING': await self.raw('PONG ' + args[1][1:]) + elif event == 'KICK' and len(args) >= 4: + chan = args[2] + kicked = args[3] + if kicked == self.nickname: + if chan in self.channels['current']: + self.channels['current'].remove(chan) elif event == 'MODE' and len(args) == 4: nick = args[2] if nick == self.nickanme: