Browse Source

Code tidy and bug fixes

pull/512/head
Daniel Gibbs 10 years ago
parent
commit
1aaf2101d7
  1. 31
      functions/fn_details_config

31
functions/fn_details_config

@ -2,7 +2,7 @@
# LGSM fn_details_config function # LGSM fn_details_config function
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://gameservermanagers.com # Website: http://gameservermanagers.com
# Version: 281015 # Version: 301015
# Description: Gets specific details from config files. # Description: Gets specific details from config files.
@ -254,7 +254,7 @@ elif [ "${engine}" == "seriousengine35" ]; then
rconpassword="NOT SET" rconpassword="NOT SET"
fi fi
else else
servername="\e[0;31mUNAVAILABLE\e[0m" rconpassword="\e[0;31mUNAVAILABLE\e[0m"
fi fi
# slots # slots
@ -327,6 +327,8 @@ elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
rconpassword="\e[0;31mUNAVAILABLE\e[0m" rconpassword="\e[0;31mUNAVAILABLE\e[0m"
fi fi
fn_servercfgfullpath
elif [ "${engine}" == "spark" ]; then elif [ "${engine}" == "spark" ]; then
# query port # query port
@ -337,6 +339,8 @@ elif [ "${engine}" == "spark" ]; then
queryport="0" queryport="0"
fi fi
fn_servercfgfullpath
elif [ "${gamename}" == "Teamspeak 3" ]; then elif [ "${gamename}" == "Teamspeak 3" ]; then
# ip # ip
@ -351,7 +355,7 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then
# dbplugin # dbplugin
if [ -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed 's/\dbplugin=//g') dbplugin=$(grep "dbplugin=" "${servercfgfullpath}" | sed 's/\dbplugin=//g')
if [ ! -n "${serverpassword}" ]; then if [ ! -n "${dbplugin}" ]; then
dbplugin="NOT SET" dbplugin="NOT SET"
fi fi
else else
@ -382,6 +386,8 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then
fileport="30033" fileport="30033"
fi fi
fn_servercfgfullpath
elif [ "${engine}" == "teeworlds" ]; then elif [ "${engine}" == "teeworlds" ]; then
# server name # server name
@ -394,14 +400,14 @@ elif [ "${engine}" == "teeworlds" ]; then
servername="unnamed server" servername="unnamed server"
fi fi
# password # server password
if [ -f "${servercfgfullpath}" ]; then if [ -f "${servercfgfullpath}" ]; then
rconpassword=$(grep "password " "${servercfgfullpath}" | sed 's/password //g' | tr -d '=\"; ') serverpassword=$(grep "password " "${servercfgfullpath}" | sed 's/password //g' | tr -d '=\"; ')
if [ ! -n "${rconpassword}" ]; then if [ ! -n "${rconpassword}" ]; then
rconpassword="NOT SET" serverpassword="NOT SET"
fi fi
else else
servername="\e[0;31mUNAVAILABLE\e[0m" serverpassword="\e[0;31mUNAVAILABLE\e[0m"
fi fi
# rcon password # rcon password
@ -411,7 +417,7 @@ elif [ "${engine}" == "teeworlds" ]; then
rconpassword="NOT SET" rconpassword="NOT SET"
fi fi
else else
servername="\e[0;31mUNAVAILABLE\e[0m" rconpassword="\e[0;31mUNAVAILABLE\e[0m"
fi fi
# port # port
@ -432,6 +438,7 @@ elif [ "${engine}" == "teeworlds" ]; then
slots="12" slots="12"
fi fi
fn_servercfgfullpath
elif [ "${engine}" == "terraria" ]; then elif [ "${engine}" == "terraria" ]; then
@ -577,6 +584,8 @@ elif [ "${engine}" == "unity3d" ]; then
queryport="0" queryport="0"
fi fi
fn_servercfgfullpath
elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
# server name # server name
@ -704,6 +713,9 @@ elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
fi fi
fi fi
fn_servercfgfullpath
elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
# server name # server name
@ -769,4 +781,7 @@ elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
if [ ! -n "${queryport}" ]; then if [ ! -n "${queryport}" ]; then
queryport="0" queryport="0"
fi fi
fn_servercfgfullpath
fi fi

Loading…
Cancel
Save