def validate_chan(chan_name):
    if len(chan_name) < 1 or chan_name[0] != '#':
        return False
    channellen = get_context().conf.limits.get('channel', None)
    if channellen and channellen > len(chan_name):
        return False
    badchars = chan_name[1:].translate(chan_allowed_chars_tbl)
    return badchars == ''
dataset/ETHPy150Open mammon-ircd/mammon/mammon/utility.py/validate_chan/swapped operands of `>`