def validate_nick(nick):
    if len(nick) < 1 or nick[0] not in first_nick_allowed_chars:
        return False
    nicklen = get_context().conf.limits.get('nick', None)
    if nicklen and len(nick) > nicklen:
        return False
    remainder = nick[1:]
    badchars = remainder.translate(nick_allowed_chars_tbl)
    return badchars == ''
dataset/ETHPy150Open mammon-ircd/mammon/mammon/utility.py/validate_nick/original