def sort_prefixes(orig, prefixes='@+'):
    """Returns a sorted list of prefixes.

    Args:
        orig (str): Unsorted list of prefixes.
        prefixes (str): List of prefixes, from highest-priv to lowest.
    """
    new = ''
    for prefix in prefixes:
        if prefix in orig:
            new += prefix
    return new