From 77836f18ad44db7287086d3e693773b36610e531 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Oct 2015 22:18:56 +0000 Subject: [PATCH] Added passwords --- functions/fn_details_config | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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:]")