From bfc3e1e5c975907d0d9886eb0cffb35a26481b86 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 5 Jul 2020 22:23:41 +0100 Subject: [PATCH] code tidy --- lgsm/data/serverlist.csv | 4 ++-- lgsm/functions/command_validate.sh | 2 +- lgsm/functions/info_config.sh | 8 ++++---- lgsm/functions/info_messages.sh | 6 +++--- lgsm/functions/update_steamcmd.sh | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 9c5d243c5..82fe70f4e 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -48,7 +48,7 @@ inss,inssserver,Insurgency: Sandstorm ios,iosserver,IOSoccer jc2,jc2server,Just Cause 2 jc3,jc3server,Just Cause 3 -jk2,jk2server,Jedi Knight 2 +jk2,jk2server,Jedi Knight II: Jedi Outcast kf,kfserver,Killing Floor kf2,kf2server,Killing Floor 2 l4d,l4dserver,Left 4 Dead @@ -108,4 +108,4 @@ wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork wurm,wurmserver,Wurm Unlimited zmr,zmrserver,Zombie Master: Reborn -zps,zpsserver,Zombie Panic! Source \ No newline at end of file +zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index c22750988..c4478e43f 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -39,12 +39,12 @@ fn_validate(){ else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" fi + elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit local exitcode=$? # All other servers. elif [ -n "${branch}" ]; then ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}" - elif [ "${shortname}" == "ac" ]||[ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" validate +quit | tee -a "${lgsmlog}" fi diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 65dbd9623..c80e98e24 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -491,7 +491,7 @@ fn_info_config_mofm(){ 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]*$//') serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed -e 's/^ *//g' -e '/^--/d' -e 's/ServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - + # Not Set servername=${servername:-"NOT SET"} serverpassword=${serverpassword:-"NOT SET"} @@ -1536,7 +1536,7 @@ elif [ "${shortname}" == "bf1942" ]; then fn_info_config_bf1942 # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then - fn_info_config_bfv + fn_info_config_bfv # Chivalry: Medieval Warfare elif [ "${shortname}" == "cmw" ]; then fn_info_config_chivalry @@ -1591,8 +1591,8 @@ elif [ "${shortname}" == "q3" ]; then # Quake Live elif [ "${shortname}" == "ql" ]; then fn_info_config_quakelive -# Jedi Outcast -elif [ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then +# Jedi Knight II: Jedi Outcast +elif [ "${shortname}" == "jk2" ]; then fn_info_config_jk2 # Minecraft elif [ "${shortname}" == "mc" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 53d049592..6f8f8519a 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -367,11 +367,11 @@ fn_info_message_gameserver(){ echo -e "${lightblue}Map rotation:\t${default}${randommap}" fi - # Server Version (Jedi Knight 2) + # Server Version (Jedi Knight II: Jedi Outcast) if [ -n "${serverversion}" ]; then echo -e "${blue}Server Version:\t${default}${serverversion}" fi - + # Listed on Master server if [ -n "${displaymasterserver}" ]; then if [ "${displaymasterserver}" == "true" ]; then @@ -1531,7 +1531,7 @@ fn_info_message_select_engine(){ elif [ "${shortname}" == "bf1942" ]; then fn_info_message_bf1942 elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv + fn_info_message_bfv elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "rust" ]; then diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 7c9644933..845343a18 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -25,7 +25,7 @@ fn_update_steamcmd_dl(){ else ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" +quit | tee -a "${lgsmlog}" fi - elif [ "${shortname}" == "ac" ]||[ "${gamename}" == "Jedi Knight II: Jedi Outcast" ]; then + elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" +quit # All other servers. else