'; echo '

Make sure Unalike\'s user is a referee in the room.

Lobby history might be useful for regaining lost access.

'; echo '
'; exit(0); } } else if (isset($_GET["delay"])) { if (!empty($_GET["target"]) && $_GET["target"] >= 1 && $_GET["target"] <= 7) { $target = floatval($_GET["target"]); $type = "set_delay"; } } else if (isset($_GET["invite"])) { if (!empty($_GET["target"])) // TARGET IS THE FILTER HERE! { $filter = $_GET["target"]; } $target = $username_irc; $type = "invite"; } else if (isset($_GET["new"])) { $type = "new_lobby"; } else if (isset($_GET["sync"])) { $type = "sync_all"; } else if (isset($_GET["shutdown"])) { $type = "shutdown"; } else if (isset($_GET["start"])) { $type = "start"; } $action = $_GET; if (!empty($type)) { $action = array( "type" => $type, "issuer" => [ "username" => $username, "username_irc" => $username_irc, "id" => $id, ]); if (!empty($target)) { $action["target"] = $target; } if (!empty($filter)) { $action["filter"] = $filter; } $json = json_decode(file_get_contents("../requests.json"), true); if (empty($json)) { $json = array($action); } else { $json[] = $action; } file_put_contents("../requests.json", json_encode($json)); header("Location: ../"); } else { echo "Unknown action."; } } else { echo "Authentication error."; }