From a08454daeeff2cae9efe426d84ed8753fca5f6e5 Mon Sep 17 00:00:00 2001 From: Frisasky Date: Mon, 7 Oct 2019 01:25:39 +0800 Subject: [PATCH] feat(config):standardise reservedslots variable (#2533) --- lgsm/config-default/config-lgsm/pstbsserver/_default.cfg | 4 ++-- lgsm/functions/info_config.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 28cb15094..c3212981c 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -17,11 +17,11 @@ queryport="10037" #servername="LinuxGSM Server" # If your server is not meeting the minimal server requirement, do not host the server for 80 players, decrease that number. maxplayers="40" -numreservedslots="2" +reservedslots="2" ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters fn_parms(){ -parms="MULTIHOME=${ip}?RANDOM=${randommap}?Port=${port}?QueryPort=${queryport}?MaxPlayers=${maxplayers}?NumReservedSlots=${numreservedslots}" +parms="MULTIHOME=${ip}?RANDOM=${randommap}?Port=${port}?QueryPort=${queryport}?MaxPlayers=${maxplayers}?NumReservedSlots=${reservedslots}" } #### LinuxGSM Settings #### diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index d141af6ab..f7bbb7bc2 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -391,11 +391,11 @@ fn_info_config_pstbs(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" maxplayers="${unavailable}" - numreservedslots="${unavailable}" + reservedslots="${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]*$//')" maxplayers="$(grep "MaxPlayers=" "${servercfgfullpath}" | tr -cd '[:digit:]')" - numreservedslots="$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]')" + reservedslots="$(grep "NumReservedSlots=" "${servercfgfullpath}" | tr -cd '[:digit:]')" fi if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then