Fix bug with redundadnt unbans.

This commit is contained in:
Jeremy Fincher 2004-10-19 01:48:58 +00:00
parent 6d62500a07
commit 80260623ec

View File

@ -338,6 +338,8 @@ class Channel(callbacks.Privmsg):
irc.queueMsg(ircmsgs.kick(channel, bannedNick, reason)) irc.queueMsg(ircmsgs.kick(channel, bannedNick, reason))
if length > 0: if length > 0:
def f(): def f():
if channel in irc.state.channels and \
banmask in irc.state.channels[channel].bans:
irc.queueMsg(ircmsgs.unban(channel, banmask)) irc.queueMsg(ircmsgs.unban(channel, banmask))
schedule.addEvent(f, time.time() + length) schedule.addEvent(f, time.time() + length)
if bannedNick == msg.nick: if bannedNick == msg.nick: