From 432c3c48f3583457c12861ed8a6cea30e10e0a2c Mon Sep 17 00:00:00 2001 From: Scarsz Date: Fri, 26 May 2017 20:16:02 -0700 Subject: [PATCH] fix up Squad block in info_config --- lgsm/functions/info_config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index a466e7e53..80118f716 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -709,17 +709,17 @@ fn_info_config_squad(){ maxplayers="${unavailable}" else servername="$(cat ${servercfgfullpath} | grep "ServerName=" | cut -c13- | rev | cut -c3- | rev)" - maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12-)" + maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12- | tr -cd '[:digit:]')" fi if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then rconport=${unavailable} rconpassword=${unavailable} else - rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) - rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c6-) - if [ -z "${rconpassword}" ]; then - rconpassword="${cyan}DISABLED${default}" + rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6- | tr -cd '[:digit:]') + rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c10-) + if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then + rconpassword="${yellow}DISABLED${default}" fi fi }