

def isProtected(self, irc, channel, hostmask):
    cap = ircdb.makeChannelCapability(channel, 'protected')
    if ircdb.checkCapability(hostmask, cap):
        self.log.debug('%s is protected on %s, it has %s.', hostmask, channel, cap)
        return True
    if ircutils.strEqual(hostmask, irc.prefix):
        return True
    return False

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Protector/plugin.py Protector.isProtected/original