@mud_action('unfriend')
def unfriend(source, args, **_):
    if not args or len(args) > 1:
        raise ActionError("Who do you want to unfriend?")
    unfriend_id = user_manager.name_to_id(args[0])
    friend_name = user_manager.id_to_name(unfriend_id)
    if friend_service.is_friend(source.dbo_id, unfriend_id):
        friend_service.del_friend(source.dbo_id, unfriend_id)
        message_service.add_message('system', "You unfriended {}.".format(friend_name), source.dbo_id)
        message_service.add_message('system', "{} unfriended you!".format(source.name), unfriend_id)
    else:
        raise ActionError("{} is not your friend".format(args[0]))
dataset/ETHPy150Open genzgd/Lampost-Mud/lampost/mud/mudcore.py/unfriend/original