From 666cb143ca76276755fcf302af256703e5630436 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Jun 2019 16:42:20 +0100 Subject: [PATCH] added serverversion --- lgsm/functions/info_config.sh | 1 + lgsm/functions/info_messages.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 05b078049..b0f5eb4f3 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -537,6 +537,7 @@ fn_info_config_jk2(){ serverpassword=$(grep "seta rconpassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta rconpassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') maxplayers=$(grep "seta sv_maxclients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') serverversion=$(grep "seta mv_serverversion" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/seta mv_serverversion//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + # Not Set rconpassword=${rconpassword:-"NOT SET"} servername=${servername:-"NOT SET"} diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 270caaadd..6e8ec2575 100644 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -328,6 +328,12 @@ fn_info_message_gameserver(){ echo -e "${blue}Map rotation:\t${default}${randommap}" fi + # Server Version (Jedi Knight 2) + if [ -n "${serverversion}" ]; then + echo -e "${blue}Server Version:\t${default}${serverversion}" + fi + serverversion + # Listed on Master Server if [ "${masterserver}" ];then if [ "${masterserver}" == "true" ];then