

def __call__(self, irc, msg):

    def ignore(reason):
        self.log.debug('Ignoring %q, %s.', msg, reason)
    if (not msg.args):
        ignore('no msg.args')
    elif (not irc.isChannel(msg.args[0])):
        ignore('not on a channel')
    elif (not self.registryValue('enable', msg.args[0])):
        ignore('supybot.plugins.Protector.enable is False.')
    elif (msg.args[0] not in irc.state.channels):
        ignore("bot isn't in channel")
    elif (irc.nick not in irc.state.channels[self.args[0]].ops):
        ignore('bot is not opped')
    elif (msg.nick not in irc.state.channels[msg.args[0]].users):
        ignore('sender is not in channel (ChanServ, maybe?)')
    elif (msg.nick not in irc.state.channels[msg.args[0]].ops):
        ignore('sender is not an op in channel (IRCOP, maybe?)')
    elif self.isImmune(irc, msg):
        ignore('sender is immune')
    else:
        super(Protector, self).__call__(irc, msg)

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Protector/plugin.py Protector.__call__/VarMisuse@141/201 `msg`->`self`