Browse Source

fix up Squad block in info_config

pull/1449/head
Scarsz 8 years ago
parent
commit
432c3c48f3
  1. 10
      lgsm/functions/info_config.sh

10
lgsm/functions/info_config.sh

@ -709,17 +709,17 @@ fn_info_config_squad(){
maxplayers="${unavailable}" maxplayers="${unavailable}"
else else
servername="$(cat ${servercfgfullpath} | grep "ServerName=" | cut -c13- | rev | cut -c3- | rev)" 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 fi
if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then
rconport=${unavailable} rconport=${unavailable}
rconpassword=${unavailable} rconpassword=${unavailable}
else else
rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6-) rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6- | tr -cd '[:digit:]')
rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c6-) rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c10-)
if [ -z "${rconpassword}" ]; then if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then
rconpassword="${cyan}DISABLED${default}" rconpassword="${yellow}DISABLED${default}"
fi fi
fi fi
} }

Loading…
Cancel
Save