

def checkPrivileges(self, irc, channel):
    if self.disabled(irc):
        return
    chanserv = self.registryValue('ChanServ')
    on = ('on %s' % irc.network)
    if (chanserv and self.registryValue('ChanServ.op', channel)):
        if (irc.nick not in irc.state.channels[channel].ops):
            self.log.info('Requesting op from %s in %s %s.', chanserv, channel, on)
            irc.sendMsg(ircmsgs.privmsg(chanserv, ('op %s' % channel)))
    if (chanserv and self.registryValue('ChanServ.halfop', channel)):
        if (irc.nick not in irc.state.channels[channel].halfops):
            self.log.info('Requesting halfop from %s in %s %s.', chanserv, channel, on)
            irc.sendMsg(ircmsgs.privmsg(chanserv, ('halfop %s' % channel)))
    if (chanserv and self.registryValue('ChanServ.voice', channel)):
        if (irc.nick not in channel.state.channels[channel].voices):
            self.log.info('Requesting voice from %s in %s %s.', chanserv, channel, on)
            irc.sendMsg(ircmsgs.privmsg(chanserv, ('voice %s' % channel)))

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Services/plugin.py Services.checkPrivileges/VarMisuse@213/317 `irc`->`channel`