From e887e23715f8a3a321f5e3f27d3e436e173e8ab3 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 9 May 2021 13:57:38 +0100 Subject: [PATCH] jc3 minecraft --- lgsm/functions/info_config.sh | 10 ++++++---- lgsm/functions/info_messages.sh | 12 +++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 23fafeb35..9a71c1487 100755 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -39,7 +39,7 @@ fn_info_config_assettocorsa(){ fi } -fn_info_config_justcause2(){ +fn_info_config_jc2(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverpassword="${unavailable}" @@ -66,7 +66,7 @@ fn_info_config_justcause2(){ fi } -fn_info_config_justcause3(){ +fn_info_config_jc3(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" serverdescription="${unavailable}" @@ -75,6 +75,7 @@ fn_info_config_justcause3(){ port="${zero}" queryPort="${zero}" steamport="${zero}" + httpport="${zero}" tickrate="${zero}" else servername=$(grep "name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -84,6 +85,7 @@ fn_info_config_justcause3(){ port=$(grep "\"port\"" "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$(grep "\"queryPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') steamport=$(grep "\"steamPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') + httpport=$(grep "\"httpPort\"" "${servercfgfullpath}" | tr -cd '[:digit:]') tickrate=$(grep "\"maxTickRate\"" "${servercfgfullpath}" | tr -cd '[:digit:]') configip=$(grep "host" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/host//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') @@ -1629,9 +1631,9 @@ elif [ "${shortname}" == "eco" ]; then elif [ "${shortname}" == "fctr" ]; then fn_info_config_factorio elif [ "${shortname}" == "jc2" ]; then - fn_info_config_justcause2 + fn_info_config_jc2 elif [ "${shortname}" == "jc3" ]; then - fn_info_config_justcause3 + fn_info_config_jc3 elif [ "${shortname}" == "kf2" ]; then fn_info_config_kf2 elif [ "${shortname}" == "mohaa" ]; then diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 560633397..c7a785bb7 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -899,6 +899,7 @@ fn_info_message_jc2(){ { echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)" + echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)" } | column -s $'\t' -t } @@ -908,19 +909,20 @@ fn_info_message_jc3(){ echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)" echo -e "Query\t${queryport}\tudp\t$(echo "${ssinfo}" | grep ${queryport} | wc -l)" echo -e "Steam\t${steamport}\tudp\t$(echo "${ssinfo}" | grep ${steamport} | wc -l)" + echo -e "HTTP\t${httpport}\ttcp\t$(echo "${ssinfo}" | grep ${httpport} | wc -l)" } | column -s $'\t' -t } -fn_info_message_minecraft(){ +fn_info_message_mc(){ { echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" - echo -e "> Game\t${port}\ttcp" + echo -e "Game\t${port}\tudp\t$(echo "${ssinfo}" | grep ${port} | wc -l)" echo -e "> Query\t${queryport}\tudp" echo -e "> Rcon\t${rconport}\ttcp" } | column -s $'\t' -t } -fn_info_message_minecraft_bedrock(){ +fn_info_message_mc_bedrock(){ { echo -e "${lightblue}DESCRIPTION\tPORT\tPROTOCOL\tLISTEN${default}" echo -e "> Game\t${port}\tudp" @@ -1475,9 +1477,9 @@ fn_info_message_select_engine(){ elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then - fn_info_message_minecraft + fn_info_message_mc elif [ "${shortname}" == "mcb" ]; then - fn_info_message_minecraft_bedrock + fn_info_message_mc_bedrock elif [ "${shortname}" == "mh" ]; then fn_info_message_mordhau elif [ "${shortname}" == "mohaa" ]; then