class IRCLevel:
    """ Enum class (Not really) for userlevels. """
    user = 0
    voice = 1
    hop = 2
    op = 3
    aop = 4
    sop = 5


def get_userlevels(nick):
    """ Return the userlevels in a list from a nick. """
    mapping = {
        '+': IRCLevel.voice,
        '%': IRCLevel.hop,
        '@': IRCLevel.op,
        '&': IRCLevel.aop,
        '~': IRCLevel.sop
    }
    levels = [0]
    
    for c in nick:
        level = mapping.get(c, IRCLevel.user)
        if level > 0:
            levels.append(level)
    return levels

class IRCLevel:
    """ Enum class (Not really) for userlevels. """
    user = 0
    vop = 1
    hop = 2
    aop = 3
    sop = 4
    owner = 5
    master = 6

Update IRCLevel and remove get_userlevels