diff --git a/functions/fn_details_config b/functions/fn_details_config index a25cbfc94..769d6fd13 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -394,6 +394,26 @@ elif [ "${engine}" == "teeworlds" ]; then servername="unnamed server" fi + # password + if [ -f "${servercfgfullpath}" ]; then + rconpassword=$(grep "password " "${servercfgfullpath}" | sed 's/password //g' | tr -d '=\"; ') + if [ ! -n "${rconpassword}" ]; then + rconpassword="NOT SET" + fi + else + servername="\e[0;31mUNAVAILABLE\e[0m" + fi + + # rcon password + if [ -f "${servercfgfullpath}" ]; then + rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed 's/sv_rcon_password //g' | tr -d '=\"; ') + if [ ! -n "${rconpassword}" ]; then + rconpassword="NOT SET" + fi + else + servername="\e[0;31mUNAVAILABLE\e[0m" + fi + # port if [ -f "${servercfgfullpath}" ]; then port=$(grep "sv_port" "${servercfgfullpath}" | tr -cd "[:digit:]")