This commit is contained in:
shoopea 2024-10-29 20:35:48 +01:00
parent a0ae297bf6
commit c22ea63d31

View File

@ -99,14 +99,14 @@ router.post('/api/go-live', is_authenticated, async (req, res) => {
try { try {
const server_id = req.body.server_id; const server_id = req.body.server_id;
const response = await rcon.execute_command(server_id, `game_mode`); const res_mode = await rcon.execute_command(server_id, `game_mode`);
const game_mode = response.split("=")[1].trim().toString(); const game_mode = res_mode.split("=")[1].trim().toString();
response = await rcon.execute_command(server_id, `game_type`); const res_type = await rcon.execute_command(server_id, `game_type`);
const game_type = response.split("=")[1].trim().toString(); const game_type = res_type.split("=")[1].trim().toString();
response = await rcon.execute_command(server_id, `mp_maxrounds`); const res_rounds = await rcon.execute_command(server_id, `mp_maxrounds`);
const maxrounds = response.split("=")[1].trim().toString(); const maxrounds = res_rounds.split("=")[1].trim().toString();
if (game_mode == "1" && maxrounds == "16") { if (game_mode == "1" && maxrounds == "16") {
console.log("Executing live_competitive_16.cfg") console.log("Executing live_competitive_16.cfg")