From e00f8358ff25998e3c9c233d944c627bd88c731a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 7 Jan 2018 20:24:07 +0000 Subject: [PATCH] fixed password display bug --- lgsm/functions/info_config.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 74330efd2..47a279f94 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -895,13 +895,13 @@ fn_info_config_stationeers(){ servername="${unavailable}" serverpassword="${unavailable}" rconpassword="${unavailable}" - maxplayers="${unavailable}" + maxplayers="${unavailable}" else servername=$(grep "SERVERNAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/SERVERNAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + serverpassword=$(grep "PASSWORD" "${servercfgfullpath}" | grep "^PASSWORD" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "RCONPASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/RCONPASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "MAXPLAYER" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/MAXPLAYER//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - + # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"}