From 125e24ceda99f5e7074999e68f3660127fbf7992 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 19 Jan 2009 21:13:10 +0000 Subject: [PATCH] Channel.kban: Fall-back to exact hostmask when banmask matches the bot. --- plugins/Channel/plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index dbaf6dc51..02e7f81d7 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -268,7 +268,6 @@ class Channel(callbacks.Plugin): itself. """ # Check that they're not trying to make us kickban ourself. - self.log.debug('In kban') if not irc.isNick(bannedNick): self.log.warning('%q tried to kban a non nick: %q', msg.prefix, bannedNick) @@ -288,11 +287,13 @@ class Channel(callbacks.Plugin): banmask = banmaskstyle.makeBanmask(bannedHostmask, [o[0] for o in optlist]) # Check (again) that they're not trying to make us kickban ourself. if ircutils.hostmaskPatternEqual(banmask, irc.prefix): - if ircutils.hostmaskPatternEqual(banmask, irc.prefix): + if ircutils.hostmaskPatternEqual(bannedHostmask, irc.prefix): self.log.warning('%q tried to make me kban myself.',msg.prefix) irc.error('I cowardly refuse to ban myself.') return else: + self.log.warning('Using exact hostmask since banmask would ' + 'ban myself.') banmask = bannedHostmask # Now, let's actually get to it. Check to make sure they have # #channel,op and the bannee doesn't have #channel,op; or that the