if (isset($team) && freeslots($lid, $team) > 0) { joinTeam($id, $team); } break; case "switchClass": if (isset($class)) { switchClass($id, $class); } break; case "readystatus": if (isset($ready)) { readystatus($id, false, $ready); } break; case "startGame": $server = new Server($lobby->lobbyserver($lid)); if ($server->id == 1) { $location = getPlayersLocation($lid); $servers = getOnlineServers(); $server = new Server(bestServer($location, $servers)); updateLobbyServer($lid, $server->id); } startLobby($lid); $players = teamplayers($lobby->type) * 2; $server->loadConfig($players, etf2l, $lobby->map); break; case "joinGame": if (!isPlayerInLobby($uid) && countPlayers($lid) != 2 * teamplayers($lobby->type)) { joinLobby($uid, $lid); } if (isPlayerInLobby($uid) != $lid) {
<?php require_once 'includes/header.php'; $css = 'style.css'; $pid = $_SESSION['id']; $lid = $_REQUEST['id']; if ($pid) { $id = getLPid($pid, $lid); $lobby = new Lobby($lid); $user = new User($pid); $sid = $lobby->lobbyserver($lid); $mid = $lobby->mid; $server = new Server($sid); $mumble = new Mumble($mid); switch ($lobby->status) { case "open": $js = 'lobby.js'; $ready = false; include_once 'includes/header.inc'; include_once 'includes/pages/lobby.inc'; break; case "ready": $js = 'lobby.js'; $ready = true; include_once 'includes/header.inc'; include_once 'includes/pages/lobby.inc'; break; case "ingame": case "finished": case "closed": $js = 'lobby_start.js';