Browse Source

feat: improve server configuration parsing

This commit improves the way server configurations are parsed by using xmllint to extract values from XML files. The eval function is also used to assign the extracted value to a variable.
pull/4244/head
Daniel Gibbs 2 years ago
parent
commit
0b94d1d11a
  1. 2
      lgsm/modules/info_game.sh

2
lgsm/modules/info_game.sh

@ -131,7 +131,7 @@ fn_info_game_xml() {
else else
servercfgparse="${servercfgfullpath}" servercfgparse="${servercfgfullpath}"
fi fi
eval "${1}"="$(xmllint --xpath "string(${2})" "${servercfgparse}")" eval "${1}=\"$(xmllint --xpath "string(${2})" "${servercfgparse}")\""
configtype="xml" configtype="xml"
} }

Loading…
Cancel
Save