From d1582312db069549b0a3aa5b069e0e8fb9574223 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 11 Apr 2021 15:07:31 +0100 Subject: [PATCH] acserver improvements acserver ac --- lgsm/functions/info_config.sh | 2 +- lgsm/functions/info_messages.sh | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 8d80c5afc..2a3510f43 100755 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -25,7 +25,7 @@ fn_info_config_assettocorsa(){ else httpport=$(grep "HTTP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') port=$(grep "TCP_PORT" "${servercfgfullpath}" | tr -cd '[:digit:]') - queryport="${port}" + queryport="${httpport}" servername=$(grep "NAME" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/NAME//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| head -n 1) adminpassword=$(grep "ADMIN_PASSWORD" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/ADMIN_PASSWORD//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 364f7855f..bbd69596d 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -741,11 +741,12 @@ fn_info_message_ark(){ } | column -s $'\t' -t } -fn_info_message_assettocorsa(){ +fn_info_message_ac(){ { echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tSTATUS${default}" - echo -e "> Game\t${port}\tudp" - echo -e "> HTTP\t${httpport}\tudp" + echo -e "Game\t${port}\ttcp/udp\t$(echo "${ssinfo}" | grep ${port} | wc -l)" + echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)" + echo -e "HTTP\t${httpport}\tudp\t$(echo "${ssinfo}" | grep ${httpport} | wc -l)" } | column -s $'\t' -t } @@ -1416,7 +1417,7 @@ fn_info_message_scpsl(){ fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then - fn_info_message_assettocorsa + fn_info_message_ac elif [ "${shortname}" == "ark" ]; then fn_info_message_ark elif [ "${shortname}" == "av" ]; then