Browse Source

fix(armar): fix parsing new a2s config (#4268)

pull/4271/head
Marcin Jakubowski 2 years ago
committed by GitHub
parent
commit
9be4a09497
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      lgsm/functions/info_game.sh
  2. 2
      lgsm/modules/info_game.sh

6
lgsm/functions/info_game.sh

@ -97,8 +97,8 @@ fn_info_game_armar() {
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
adminpassword="${unavailable}" adminpassword="${unavailable}"
maxplayers="${zero}" maxplayers="${zero}"
port=${port:-"0"} port="${zero}"
queryport= queryport="${zero}"
servername="${unavailable}" servername="${unavailable}"
serverpassword="${unavailable}" serverpassword="${unavailable}"
else else
@ -107,7 +107,7 @@ fn_info_game_armar() {
configip=$(jq -r '.bindAddress' "${servercfgfullpath}") configip=$(jq -r '.bindAddress' "${servercfgfullpath}")
maxplayers=$(jq -r '.game.maxPlayers' "${servercfgfullpath}") maxplayers=$(jq -r '.game.maxPlayers' "${servercfgfullpath}")
port=$(jq -r '.bindPort' "${servercfgfullpath}") port=$(jq -r '.bindPort' "${servercfgfullpath}")
queryport=$(jq -r '.steamQueryPort' "${servercfgfullpath}") queryport=$(jq -r '.a2s.port' "${servercfgfullpath}")
servername=$(jq -r '.game.name' "${servercfgfullpath}") servername=$(jq -r '.game.name' "${servercfgfullpath}")
serverpassword=$(jq -r '.game.password' "${servercfgfullpath}") serverpassword=$(jq -r '.game.password' "${servercfgfullpath}")

2
lgsm/modules/info_game.sh

@ -876,7 +876,7 @@ fn_info_game_armar() {
fn_info_game_json "configip" ".bindAddress" fn_info_game_json "configip" ".bindAddress"
fn_info_game_json "maxplayers" ".game.maxPlayers" fn_info_game_json "maxplayers" ".game.maxPlayers"
fn_info_game_json "port" ".bindPort" fn_info_game_json "port" ".bindPort"
fn_info_game_json "queryport" ".steamQueryPort" fn_info_game_json "queryport" ".a2s.port"
fn_info_game_json "servername" ".game.name" fn_info_game_json "servername" ".game.name"
fn_info_game_json "serverpassword" ".game.password" fn_info_game_json "serverpassword" ".game.password"
fi fi

Loading…
Cancel
Save