@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', [chan, '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

        # XXX - this may need to be split up if we start enforcing an outbound packet size
        if 'userhost-in-names' > 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/operator `in` -> `>`