From c22ea63d313d71ec21ef6af05968a726a306c2bd Mon Sep 17 00:00:00 2001 From: shoopea Date: Tue, 29 Oct 2024 20:35:48 +0100 Subject: [PATCH] update --- routes/game.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/routes/game.js b/routes/game.js index 09640d3..590a880 100644 --- a/routes/game.js +++ b/routes/game.js @@ -99,14 +99,14 @@ router.post('/api/go-live', is_authenticated, async (req, res) => { try { const server_id = req.body.server_id; - const response = await rcon.execute_command(server_id, `game_mode`); - const game_mode = response.split("=")[1].trim().toString(); + const res_mode = await rcon.execute_command(server_id, `game_mode`); + const game_mode = res_mode.split("=")[1].trim().toString(); - response = await rcon.execute_command(server_id, `game_type`); - const game_type = response.split("=")[1].trim().toString(); + const res_type = await rcon.execute_command(server_id, `game_type`); + const game_type = res_type.split("=")[1].trim().toString(); - response = await rcon.execute_command(server_id, `mp_maxrounds`); - const maxrounds = response.split("=")[1].trim().toString(); + const res_rounds = await rcon.execute_command(server_id, `mp_maxrounds`); + const maxrounds = res_rounds.split("=")[1].trim().toString(); if (game_mode == "1" && maxrounds == "16") { console.log("Executing live_competitive_16.cfg")