quit.txt 266 Bytes
def quit(id, players, mud):
    # send the player back the list of possible commands
    mud.send_message(id, "Saving...")
    utils.save_object_to_file(players[id], "players/{}.json".format(players[id]["name"]))
    mud.disconnect_player(id)

quit(id, players, mud)