

@eventmgr_rfc1459.message('NAMES', min_params=1)
def m_NAMES(cli, ev_msg):
    chanlist = ev_msg['params'][0].split(',')
    for chan in chanlist:
        if (not validate_chan(chan)):
            cli.dump_numeric('479', [chan, 'Illegal channel name'])
            return
        ch = cli.ctx.chmgr.get(ev_msg['params'][0], create=False)
        if (not ch):
            cli.dump_numeric('403', [chanlist, 'No such channel'])
            return
        names_f = (lambda x: True)
        if (not ch.has_member(cli)):
            names_f = (lambda x: ('user:invisible' not in x.client.props))
        if ('userhost-in-names' in cli.caps):
            cli.dump_numeric('353', [ch.classification, ch.name, ' '.join([m.hostmask for m in filter(names_f, ch.members)])])
        else:
            cli.dump_numeric('353', [ch.classification, ch.name, ' '.join([m.name for m in filter(names_f, ch.members)])])
        cli.dump_numeric('366', [ch.name, 'End of /NAMES list.'])

dataset/ETHPy150Open mammon-ircd/mammon/mammon/channel.py m_NAMES/VarMisuse@111/151 `chan`->`chanlist`