Browse Source

jc3 minecraft

pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
e887e23715
  1. 10
      lgsm/functions/info_config.sh
  2. 12
      lgsm/functions/info_messages.sh

10
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

12
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

Loading…
Cancel
Save