Browse Source

fix(details): master server will now only show if set to true (#2488)

pull/2491/head
Daniel Gibbs 6 years ago
committed by GitHub
parent
commit
81c9e51846
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      lgsm/functions/command_debug.sh
  2. 4
      lgsm/functions/info_distro.sh
  3. 8
      lgsm/functions/info_messages.sh

8
lgsm/functions/command_debug.sh

@ -62,11 +62,11 @@ if [ -n "${extip}" ]; then
fi
fi
# Listed on Master Server.
if [ "${masterserver}" ];then
if [ "${masterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${masterserver}${default}"
if [ "${displaymasterserver}" ];then
if [ "${displaymasterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${displaymasterserver}${default}"
else
echo -e "${blue}Master Server:\t${red}${masterserver}${default}"
echo -e "${blue}Master Server:\t${red}${displaymasterserver}${default}"
fi
fi
# Server password.

4
lgsm/functions/info_distro.sh

@ -240,9 +240,9 @@ if [ "$(command -v jq 2>/dev/null)" ]; then
masterserver=$(${curlpath} -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${extip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)
fi
if [ "${masterserver}" == "0" ]; then
masterserver="false"
displaymasterserver="false"
else
masterserver="true"
displaymasterserver="true"
fi
fi
fi

8
lgsm/functions/info_messages.sh

@ -329,11 +329,11 @@ fn_info_message_gameserver(){
fi
# Listed on Master Server
if [ "${masterserver}" ];then
if [ "${masterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${masterserver}${default}"
if [ "${displaymasterserver}" ];then
if [ "${displaymasterserver}" == "true" ];then
echo -e "${blue}Master Server:\t${green}${displaymasterserver}${default}"
else
echo -e "${blue}Master Server:\t${red}${masterserver}${default}"
echo -e "${blue}Master Server:\t${red}${displaymasterserver}${default}"
fi
fi

Loading…
Cancel
Save