From 0b94d1d11a8371dfe09dbf2e00bfb89addfc6295 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 14 Jun 2023 21:46:25 +0100 Subject: [PATCH] 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. --- lgsm/modules/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/modules/info_game.sh b/lgsm/modules/info_game.sh index d2714ec3e..f0dd73d18 100644 --- a/lgsm/modules/info_game.sh +++ b/lgsm/modules/info_game.sh @@ -131,7 +131,7 @@ fn_info_game_xml() { else servercfgparse="${servercfgfullpath}" fi - eval "${1}"="$(xmllint --xpath "string(${2})" "${servercfgparse}")" + eval "${1}=\"$(xmllint --xpath "string(${2})" "${servercfgparse}")\"" configtype="xml" }