From e4e8b5fbf3f4f2b5fe620cd2f75aedfe8214ebea Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Mon, 11 Sep 2017 22:34:52 +0100 Subject: [PATCH] added KF2 --- lgsm/functions/info_config.sh | 37 +++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 5e0c47694..3f1ee7575 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -627,7 +627,21 @@ fn_info_config_unreal3(){ webadminpass="${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]*$//') - webadminpass=$(grep grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi +} + +fn_info_config_kf2(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + webadminpass="${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]*$//') + webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') # Not Set servername=${servername:-"NOT SET"} @@ -804,6 +818,18 @@ elif [ "${engine}" == "dontstarve" ]; then # Factorio elif [ "${gamename}" == "Factorio" ]; then fn_info_config_factorio +# Killing Floor 2 +elif [ "${gamename}" == "Killing Floor 2" ]; then + fn_info_config_kf2 +# Minecraft +elif [ "${engine}" == "lwjgl2" ]; then + fn_info_config_minecraft +# Project Cars +elif [ "${gamename}" == "Project Cars" ]; then + fn_info_config_projectcars +# Project Zomboid +elif [ "${engine}" == "projectzomboid" ]; then + fn_info_config_projectzomboid # QuakeWorld elif [ "${gamename}" == "QuakeWorld" ]; then fn_info_config_quakeworld @@ -816,15 +842,6 @@ elif [ "${gamename}" == "Quake 3: Arena" ]; then # Quake Live elif [ "${gamename}" == "Quake Live" ]; then fn_info_config_quakelive -# Minecraft -elif [ "${engine}" == "lwjgl2" ]; then - fn_info_config_minecraft -# Project Cars -elif [ "${gamename}" == "Project Cars" ]; then - fn_info_config_projectcars -# Project Zomboid -elif [ "${engine}" == "projectzomboid" ]; then - fn_info_config_projectzomboid # ARMA 3 elif [ "${engine}" == "realvirtuality" ]; then fn_info_config_realvirtuality