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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
22 additions and
1 deletions
-
lgsm/functions/info_distro.sh
-
lgsm/functions/info_messages.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 |
|
|
@ -71,7 +71,7 @@ fn_info_message_performance(){ |
|
|
|
} | column -s $'\t' -t |
|
|
|
echo -e "" |
|
|
|
{ |
|
|
|
echo -e "${blue}Mem:\t${blue}total\t used\t free\t cached\t available${default}" |
|
|
|
echo -e "${blue}Mem:\t${blue}total\tused\tfree\tcached\tavailable${default}" |
|
|
|
echo -e "${blue}Physical:\t${default}${physmemtotal}\t${physmemused}\t${physmemfree}\t${physmemcached}\t${physmemavailable}${default}" |
|
|
|
echo -e "${blue}Swap:\t${default}${swaptotal}\t${swapused}\t${swapfree}${default}" |
|
|
|
} | column -s $'\t' -t |
|
|
@ -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}" |
|
|
|