@eventmgr_rfc1459.message('JOIN', min_params=1, update_idle=True)
def m_JOIN(cli, ev_msg):
    chanlist = ev_msg['params'][0].split(',')

    for chan in chanlist:
        channellen = cli.ctx.conf.limits.get('channel', None)
        if channellen and len(chan) > channellen:
            chan = chan[:channellen]
        if not validate_chan(chan):
            cli.dump_numeric('479', [chan, 'Illegal channel name'])
            return
        ch = cli.ctx.chmgr.get(chan, create=True)
        if ch.has_member(cli):
            continue
        if not ch.authorize(cli, ev_msg):
            continue

        # join channel
        info = {
            'channel': ch,
            'client': cli,
        }
        eventmgr_core.dispatch('channel join', info)
dataset/ETHPy150Open mammon-ircd/mammon/mammon/channel.py/m_JOIN/original