From 7892d94c6cce26d635a1d5e899fad0d326bbc065 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 Aug 2015 17:23:00 +0100 Subject: [PATCH] Added unreal 4 servername --- functions/fn_details_config | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/functions/fn_details_config b/functions/fn_details_config index b51b8f174..1bd5f9c15 100644 --- a/functions/fn_details_config +++ b/functions/fn_details_config @@ -2,7 +2,7 @@ # LGSM fn_details_config function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -# Version: 280715 +# Version: 090815 # Description: Gets specific details from config files. @@ -295,7 +295,7 @@ elif [ "${engine}" == "seriousengine35" ]; then fn_servercfgfullpath -elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then +elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then # server name if [ -f "${servercfgfullpath}" ]; then @@ -516,7 +516,7 @@ elif [ "${engine}" == "unity3d" ]; then queryport="0" fi -elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then +elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then # server name if [ -f "${servercfgfullpath}" ]; then @@ -643,4 +643,16 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fi fi +elif [ "${engine}" == "unreal4" ]; then + + # server name + if [ -f "${servercfgfullpath}" ]; then + servername=$(grep "SessionName=" "${servercfgfullpath}" | sed 's/SessionName=//g') + if [ ! -n "${servername}" ]; then + servername="NOT SET" + fi + else + servername="\e[0;31mUNAVAILABLE\e[0m" + fi + fi