def doKick(self, irc, msg):
        channel = msg.args[0]
        kicked = msg.args[1].split(',')
        protected = []
        for nick in kicked:
            if ircutils.strEqual(nick, irc.nick):
                return # Channel will handle the rejoin.
        for nick in kicked:
            hostmask = irc.state.nickToHostmask(nick)
            if self.isProtected(irc, channel, hostmask):
                self.log.info('%s was kicked from %s and is protected; '
                              'inviting back.', hostmask, 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)
dataset/ETHPy150Open ProgVal/Limnoria/plugins/Protector/plugin.py/Protector.doKick/operator `%` -> `+`