Browse Source

code tidy

pull/3002/head
Daniel Gibbs 5 years ago
parent
commit
bfc3e1e5c9
  1. 4
      lgsm/data/serverlist.csv
  2. 2
      lgsm/functions/command_validate.sh
  3. 8
      lgsm/functions/info_config.sh
  4. 6
      lgsm/functions/info_messages.sh
  5. 2
      lgsm/functions/update_steamcmd.sh

4
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
zps,zpsserver,Zombie Panic! Source

Can't render this file because it has a wrong number of fields in line 66.

2
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

8
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

6
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

2
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

Loading…
Cancel
Save