Browse Source

Getting Quake live monitor and details working

pull/718/head
Daniel Gibbs 9 years ago
parent
commit
1596383554
  1. 4
      QuakeLive/qlserver
  2. 27
      functions/command_details.sh
  3. 45
      functions/info_config.sh

4
QuakeLive/qlserver

@ -26,8 +26,8 @@ steampass=""
# Start Variables
gameport="27960"
rconport="28960"
rcon_password='ch@ng3me'
stats_password='ch@ng3me'
rconpassword="ch@ng3me"
statspassword="ch@ng3me"
mappool='mappool.txt'
ip="0.0.0.0"
updateonstart="off"

27
functions/command_details.sh

@ -306,6 +306,31 @@ fi
fn_details_statusbottom
}
fn_details_id3tech(){
echo -e ""
echo -e "\e[92mPorts\e[0m"
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
echo -e "Change ports by editing the parameters in"
echo -e "${servercfgfullpath}."
echo -e ""
echo -e "Useful port diagnostic command:"
echo -e "netstat -atunp | grep run_server"
echo -e ""
if [ -z "${port}" ]||[ -z "${queryport}" ]||[ -z "${masterport}" ]; then
echo -e "\e[0;31mERROR!\e[0m Missing/commented ports in ${servercfg}."
echo -e ""
fi
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game\tINBOUND\t${port}\tudp"
echo -e "> Rcon: Query\tINBOUND\t${rconport}\tudp"
echo -e "> Stats: Master traffic\tINBOUND\t${statsport}\tudp"
} | column -s $'\t' -t
fn_details_statusbottom
}
fn_details_seriousengine35(){
echo -e ""
echo -e "\e[92mPorts\e[0m"
@ -603,6 +628,8 @@ elif [ "${engine}" == "dontstarve" ]; then
fn_details_dontstarve
elif [ "${engine}" == "projectzomboid" ]; then
fn_details_projectzomboid
elif [ "${engine}" == "idtech3" ]; then
fn_details_idtech3
elif [ "${engine}" == "realvirtuality" ]; then
fn_details_realvirtuality
elif [ "${engine}" == "seriousengine35" ]; then

45
functions/info_config.sh

@ -154,6 +154,51 @@ elif [ "${engine}" == "projectzomboid" ]; then
port="0"
fi
# Quake Live
elif [ "${engine}" == "idtech3" ]; then
# server name
if [ -f "${servercfgfullpath}" ]; then
servername=$(grep "set sv_hostname " "${servercfgfullpath}" | sed 's/set sv_hostname //g' | tr -d '=\"; ')
if [ ! -n "${servername}" ]; then
servername="NOT SET"
fi
else
servername="\e[0;31mUNAVAILABLE\e[0m"
fi
# rcon password
rconpassword="${rconpassword}"
if [ -f "${servercfgfullpath}" ]; then
if [ ! -n "${rconpassword}" ]; then
rconpassword="NOT SET"
fi
else
rconpassword="\e[0;31mUNAVAILABLE\e[0m"
fi
# slots
if [ -f "${servercfgfullpath}" ]; then
slots=$(grep "set sv_maxClients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
if [ ! -n "${slots}" ]; then
slots="NOT SET"
fi
else
slots="\e[0;31mUNAVAILABLE\e[0m"
fi
# port
port="${gameport}"
if [ ! -n "${port}" ]; then
port="0"
fi
# rcon port
if [ ! -n "${rconport}" ]; then
rconport="0"
fi
# ARMA 3
elif [ "${engine}" == "realvirtuality" ]; then

Loading…
Cancel
Save