Moved some code out of cmd_players and cmd_status