From e200d124caa9ed6e952c724ec663e93c2da556b3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:16:47 +0000 Subject: [PATCH 1/7] added new start parameters --- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 5fabdb61d..2acf5aa78 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -9,13 +9,15 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - port="7777" queryport="27015" +defaultmap="Outpost" +servername="LinuxGSM Server (DE)" +maxplayers="8" # Can not be adjusted currently ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="Port=${port}?QueryPort=${queryport}" +parms="Port=${port}?QueryPort=${queryport} -startup_map '${defaultmap}' -server_name '${servername}'" } #### LinuxGSM Settings #### From d303a7cdad37b7f9fd416052d04b5ae32c46f7e2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:20:10 +0000 Subject: [PATCH 2/7] corrected servename --- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 2acf5aa78..7ced8c70e 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -12,7 +12,7 @@ port="7777" queryport="27015" defaultmap="Outpost" -servername="LinuxGSM Server (DE)" +servername="LinuxGSM Server" maxplayers="8" # Can not be adjusted currently ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters From 1b8ac56c283e25293b15a3b73189b769c6abed48 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:20:21 +0000 Subject: [PATCH 3/7] added new start parameters corrected servername corrected servename --- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 5fabdb61d..7ced8c70e 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -9,13 +9,15 @@ #### Server Settings #### ## Server Start Settings | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters - port="7777" queryport="27015" +defaultmap="Outpost" +servername="LinuxGSM Server" +maxplayers="8" # Can not be adjusted currently ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="Port=${port}?QueryPort=${queryport}" +parms="Port=${port}?QueryPort=${queryport} -startup_map '${defaultmap}' -server_name '${servername}'" } #### LinuxGSM Settings #### From 1e0ae7bd8c35a830d179117cc44a7b69aeae7381 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:27:18 +0000 Subject: [PATCH 4/7] fix(details): resolve current game mode showing incorrectly --- lgsm/functions/info_messages.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index c9066c878..24821c9cd 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -231,7 +231,10 @@ fn_info_message_gameserver(){ echo -e "${blue}Current Scenario:\t${default}${gdgamemode}" fi else - echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}" + # Current Scenario + if [ -n "${gdgamemode}" ]; then + echo -e "${blue}Current Game Mode:\t${default}${gdgamemode}" + fi fi # Default Map From 1ba7e7121e8f778d7181eebaed0e0a71143152ff Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:28:05 +0000 Subject: [PATCH 5/7] refactor(details): change gamedig vars to unset if required --- lgsm/functions/query_gamedig.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 1bdce107a..21e0ed091 100644 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -89,37 +89,37 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # server name gdname=$(echo "${gamedigraw}" | jq -re '.name') if [ "${gdname}" == "null" ]; then - gdname= + unset gdname fi # numplayers gdplayers=$(echo "${gamedigraw}" | jq -re '.players|length') if [ "${gdplayers}" == "null" ]; then - gdplayers= + unset gdplayers fi # maxplayers gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers|length') if [ "${gdmaxplayers}" == "null" ]; then - maxplayers= + unset maxplayers fi # current map gdmap=$(echo "${gamedigraw}" | jq -re '.map') if [ "${gdmap}" == "null" ]; then - gdmap= + unset gdmap fi # current gamemode gdgamemode=$(echo "${gamedigraw}" | jq -re '.raw.rules.GameMode_s') if [ "${gdgamemode}" == "null" ]; then - gdgamemode= + unset gdgamemode fi # numbots gdbots=$(echo "${gamedigraw}" | jq -re '.raw.numbots') if [ "${gdbots}" == "null" ]; then - gdbots= + unset gdbots fi fi fi \ No newline at end of file From 667a410b3f5b2ee8a57253049d56da66d67f1709 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:41:00 +0000 Subject: [PATCH 6/7] added serverpassword for future release --- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 7ced8c70e..304bbb689 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -13,7 +13,8 @@ port="7777" queryport="27015" defaultmap="Outpost" servername="LinuxGSM Server" -maxplayers="8" # Can not be adjusted currently +serverpassword="NOT SET" # Can't be adjusted currently +maxplayers="8" # Can't be adjusted currently ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ From 6d5fc73836499ef7ae38115c97ffb1381afcdbb9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 7 Dec 2018 19:49:15 +0000 Subject: [PATCH 7/7] update parameters to use " --- lgsm/config-default/config-lgsm/sbotsserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index 304bbb689..6c536684f 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -18,7 +18,7 @@ maxplayers="8" # Can't be adjusted currently ## Server Start Command | https://github.com/GameServerManagers/LinuxGSM/wiki/Start-Parameters#additional-parameters fn_parms(){ -parms="Port=${port}?QueryPort=${queryport} -startup_map '${defaultmap}' -server_name '${servername}'" +parms="Port=${port}?QueryPort=${queryport} -startup_map \"${defaultmap}\" -server_name \"${servername}\"" } #### LinuxGSM Settings ####