IRCP

- information gathering tool for irc servers
git clone git://git.acid.vegas/IRCP.git
Log | Files | Refs | Archive | README | LICENSE

commit b5188fd38a5ad939526bcb9fbc389859a019d8e4
parent 344421f016a3561a3085c6069774df58f3db4061
Author: acidvegas <acid.vegas@acid.vegas>
Date: Sun, 18 Jun 2023 19:31:53 -0400

Handle removing channels from the current list when kicked

Diffstat:
Mircp.py | 6++++++

1 file changed, 6 insertions(+), 0 deletions(-)

diff --git 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: