From ed91a8a426b6e977d8b3c75a69ca258343073afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eli=C3=A1n=20Hanisch?= Date: Sat, 18 Jun 2011 23:14:35 -0300 Subject: [PATCH] bantracker: When joining a channel, discard the ban list for that channel. --- Bantracker/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bantracker/plugin.py b/Bantracker/plugin.py index 5843941..ef664ea 100644 --- a/Bantracker/plugin.py +++ b/Bantracker/plugin.py @@ -697,9 +697,9 @@ class Bantracker(callbacks.Plugin): else: self.doLog(irc, channel, '*** %s has joined %s\n' % (msg.prefix, channel)) - if not channel in self.bans.keys(): - self.bans[channel] = [] - if msg.prefix.split('!', 1)[0] == irc.nick: + if msg.nick == irc.nick: + if channel in self.bans: + del self.bans[channel] queue.queue(ircmsgs.mode(channel, 'b')) nick = msg.nick.lower() or msg.prefix.lower().split('!', 1)[0] self.nicks[nick] = msg.prefix.lower()