From e3f28a620e21daff30162dbb21ab792358ae2dca Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Aug 2015 19:58:27 +0100 Subject: [PATCH] Added more details for ARK server --- functions/fn_details_config | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/functions/fn_details_config b/functions/fn_details_config index 744d89922..64284e05e 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -685,4 +685,27 @@ elif [ "${engine}" == "unreal4" ]; then slots="\e[0;31mUNAVAILABLE\e[0m" fi + # port + if [ -f "${servercfgfullpath}" ]; then + port=$(grep "Port=" "${servercfgfullpath}" | grep -v "RCONPort=" | grep -v "QueryPort=" | tr -cd "[:digit:]") + fi + if [ ! -n "${port}" ]; then + port="0" + fi + + # rcon port + if [ -f "${servercfgfullpath}" ]; then + rcon=$(grep "RCONPort=" "${servercfgfullpath}" | tr -cd "[:digit:]") + fi + if [ ! -n "${rcon}" ]; then + rcon="0" + fi + + # query port + if [ -f "${servercfgfullpath}" ]; then + queryport=$(grep "QueryPort=" "${servercfgfullpath}" | tr -cd "[:digit:]") + fi + if [ ! -n "${queryport}" ]; then + queryport="0" + fi fi