From a7637be88d417d91ca113a630ffb4d2f2e85467b Mon Sep 17 00:00:00 2001 From: H3o66 Date: Thu, 3 Nov 2022 22:19:24 +0100 Subject: [PATCH] fix(rust): allow queryport to be changed and parsed --- lgsm/functions/info_game.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 77169b3f3..89dd5b928 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1462,7 +1462,12 @@ fn_info_game_rust() { # Parameters servername=${servername:-"NOT SET"} port=${port:-"0"} - queryport=${port:-"0"} + if [ -f "${servercfgfullpath}" ]; then + queryport=$(sed -nr 's/^queryport\s+(.*)/\1/p' "${servercfgfullpath}") + fi + if [ -z "${queryport}" ]; then + queryport=${port:-"0"} + fi appport=${appport:-"0"} rconport=${rconport:-"0"} gamemode=${gamemode:-"NOT SET"}