Browse Source

Added more details for ARK server

Daniel Gibbs 10 years ago
parent
commit
e3f28a620e
1 changed files with 23 additions and 0 deletions
  1. 23 0
      functions/fn_details_config

+ 23 - 0
functions/fn_details_config

@@ -685,4 +685,27 @@ elif [ "${engine}" == "unreal4" ]; then
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 		slots="\e[0;31mUNAVAILABLE\e[0m"
 	fi
 	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
 fi