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")