diff --git a/plugins/Protector/plugin.py b/plugins/Protector/plugin.py index 0e2a0e6cb..5e99e5637 100644 --- a/plugins/Protector/plugin.py +++ b/plugins/Protector/plugin.py @@ -143,8 +143,14 @@ class Protector(callbacks.Plugin): if self.isProtected(irc, channel, hostmask): self.log.info('%s was kicked from %s and is protected; ' 'inviting back.', hostmask, channel) - irc.queueMsg(ircmsgs.invite(nick, channel)) + hostmask = '%s!%s' % (nick, irc.state.nickToHostmask(nick)) protected.append(nick) + bans = [] + for banmask in irc.state.channels[channel].bans: + if ircutils.hostmaskPatternEqual(banmask, hostmask): + bans.append(banmask) + irc.queueMsg(ircmsgs.unbans(channel, bans)) + irc.queueMsg(ircmsgs.invite(nick, channel)) if not self.isOp(irc, channel, msg.prefix): self.demote(irc, channel, msg.nick) diff --git a/src/version.py b/src/version.py index a7445bac0..30121aea8 100644 --- a/src/version.py +++ b/src/version.py @@ -1,3 +1,3 @@ """stick the various versioning attributes in here, so we only have to change them once.""" -version = '0.83.4.1+limnoria (2011-07-09T13:43:24+0200)' +version = '0.83.4.1+limnoria (2011-07-09T13:44:16+0200)'