Browse Source

Details will now list if game server is on the Steam Master server (#1986)

Details will list if game server is on the Steam Master server

fixes #1847
pull/1987/head
Daniel Gibbs 7 years ago
committed by GitHub
parent
commit
1c554a8be1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      lgsm/functions/info_distro.sh
  2. 9
      lgsm/functions/info_messages.sh

12
lgsm/functions/info_distro.sh

@ -172,3 +172,15 @@ if [ -z "${extip}" ]; then
fi
fi
fi
# Steam Master Server - checks if detected by master server
if [ "${ip}" ] && [ "${port}" ]; then
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]||[ "${shortname}" == "jc2" ]||[ "${shortname}" == "ql" ]; then
masterserver=$(${curlpath} -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)
if [ "${steammaster}" == "1" ]; then
masterserver="true"
else
masterserver="false"
fi
fi
fi

9
lgsm/functions/info_messages.sh

@ -287,6 +287,15 @@ fn_info_message_gameserver(){
echo -e "${blue}Map rotation:\t${default}${randommap}"
fi
# Listed on Master Server
if [ "${masterserver}" ];then
if [ "${masterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${masterserver}${default}"
else
echo -e "${blue}Master Server:\t${red}${masterserver}${default}"
fi
fi
# Online status
if [ "${status}" == "0" ]; then
echo -e "${blue}Status:\t${red}OFFLINE${default}"

Loading…
Cancel
Save