

def doChanservNotice(self, irc, msg):
    if self.disabled(irc):
        return
    s = msg.args[1].lower()
    channel = None
    m = self._chanRe.search(s)
    networkGroup = conf.supybot.networks.get(irc.network)
    on = ('on %s' % irc.network)
    if (m is not None):
        channel = m.group(1)
    if (('all bans' in s) or ('unbanned from' in s)):
        irc.sendMsg(networkGroup.channels.join(channel))
    elif ("isn't registered" in s):
        self.log.warning('Received "%s isn\'t registered" from ChanServ %s', channel, on)
    elif ('this channel has been registered' in s):
        self.log.debug('Got "Registered channel" from ChanServ %s.', on)
    elif ('already opped' in s):
        self.log.debug('Got "Already opped" from ChanServ %s.', on)
    elif (('access level' in s) and ('is required' in s)):
        self.log.warning('Got "Access level required" from ChanServ %s.', on)
    elif ('inviting' in s):
        self.log.debug('Got "Inviting to channel" from ChanServ %s.', s)
    elif s.startswith('['):
        chanTypes = irc.state.supported['CHANTYPES']
        if re.match(('^\\[[%s]' % re.escape(chanTypes)), s):
            self.log.debug('Got entrymsg from ChanServ %s.', on)
    elif ircutils.isChannel(msg.args[0]):
        pass
    else:
        self.log.warning('Got unexpected notice from ChanServ %s: %r.', on, msg)

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Services/plugin.py Services.doChanservNotice/VarMisuse@243/408 `on`->`s`