Skip to content
Permalink
Browse files

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

  • Loading branch information...
dgibbs64 committed Aug 27, 2019
1 parent e854469 commit 81c9e5184687ccaa4784f97e20d3796fcc92b524
Showing with 10 additions and 10 deletions.
  1. +4 −4 lgsm/functions/command_debug.sh
  2. +2 −2 lgsm/functions/info_distro.sh
  3. +4 −4 lgsm/functions/info_messages.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.
@@ -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
@@ -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

0 comments on commit 81c9e51

Please sign in to comment.
You can’t perform that action at this time.