Browse Source

acserver improvements

acserver


ac
pull/3428/head
Daniel Gibbs 4 years ago
parent
commit
d1582312db
  1. 2
      lgsm/functions/info_config.sh
  2. 9
      lgsm/functions/info_messages.sh

2
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]*$//')

9
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

Loading…
Cancel
Save