Browse Source

prevent steamport from showing if not available

steamport fix
pull/3550/head
Daniel Gibbs 4 years ago
parent
commit
36d80115a4
  1. 5
      lgsm/functions/info_game.sh
  2. 6
      lgsm/functions/info_messages.sh

5
lgsm/functions/info_game.sh

@ -1511,12 +1511,11 @@ fn_info_game_source(){
rconport=${port:-"0"}
queryport=${port:-"0"}
clientport=${clientport:-"0"}
# Steamport can be between 26901-26910 and is normaly automaticly set.
# Steamport can be between 26901-26910 and is normaly automatically set.
# Some servers might support -steamport parameter to set
if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then
if [ "${steamport}" == "0" ]||[ -v "${steamport}" ]; then
steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)"
fi
steamport="${steamport:-"0"}"
}
fn_info_game_spark(){

6
lgsm/functions/info_messages.sh

@ -1339,8 +1339,10 @@ fn_info_message_source(){
fn_port "Query" queryport tcp
fn_port "RCON" rconport tcp
fn_port "SourceTV" sourcetvport udp
# not manualy set by default more research needed
fn_port "Steam" steamport udp
# Will not show if unaviable
if [ "${steamport}" == "0" ]||[ -z "${steamport}" ]; then
fn_port "Steam" steamport udp
fi
fn_port "Client" clientport udp
} | column -s $'\t' -t
}

Loading…
Cancel
Save