From 920657e7742fe79391a7e6a19d2a9f2320de7815 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 23 Aug 2022 21:33:28 +0200 Subject: [PATCH] fix(vints): refactor to fix it when there is no config for the server (#3955) --- lgsm/functions/info_game.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 2d704a2ba..3a62c67dd 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -2177,20 +2177,17 @@ fn_info_game_vints() { servername="${unavailable}" maxplayers="${unavailable}" serverpassword="${unavailable}" - port="${unavailable}" - queryport="${unavailable}" - configip="${unavailable}" + port="${port:-"0"}" else servername=$(jq -r '.ServerName' "${servercfgfullpath}") maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") port=$(jq -r '.Port' "${servercfgfullpath}") - queryport=${port:-"0"} configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") - - serverpassword=${serverpassword:-"NOT SET"} - configip=${configip:-"0.0.0.0"} fi + queryport=${port:-"0"} + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} } fn_info_game_wet() {