From 800e1d754cd2610ed86eada0e08f919c60dddfa8 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Wed, 31 Dec 2014 17:51:05 +0000 Subject: [PATCH] Update channel users when a nick is kicked --- tipbot/irc.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tipbot/irc.py b/tipbot/irc.py index ee364e1..872b7db 100644 --- a/tipbot/irc.py +++ b/tipbot/irc.py @@ -423,6 +423,17 @@ def IRCLoop(on_idle,on_identified,on_command): del userstable[chan][nick] log_log("New list of users in %s: %s" % (chan, str(userstable[chan].keys()))) + elif action == 'KICK': + nick = parts[3] + log_info('%s was kicked' % nick) + removed_list = "" + for chan in userstable: + log_log("Checking in %s" % chan) + if nick in userstable[chan]: + removed_list = removed_list + " " + chan + del userstable[chan][nick] + log_log("New list of users in %s: %s" % (chan, str(userstable[chan].keys()))) + elif action == 'NICK': nick = GetNick(who) new_nick = text