Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Jan 7, 2025
1 parent 181cd50 commit 4e19c9b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lgsm/modules/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@

moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

# Converts querytype to imgsoquerytype for use with ismygameserver.online urls
if [ -n "${querytype}" ]; then
if [ "${querytype}" == "protocol-valve" ]; then
imgsoquerytype="valve"
elif [ "${querytype}" == "protocol-gamespy1" ]; then
imgsoquerytype="gamespy"
elif [ "${querytype}" == "protocol-gamespy2" ]; then
imgsoquerytype="gamespy"
elif [ "${querytype}" == "protocol-gamespy3" ]; then
imgsoquerytype="gamespy"
elif [ "${querytype}" == "protocol-quake1" ]; then
imgsoquerytype="quake"
elif [ "${querytype}" == "protocol-quake2" ]; then
imgsoquerytype="quake"
elif [ "${querytype}" == "protocol-quake3" ]; then
imgsoquerytype="quake"
elif [ "${querytype}" == "protocol-unreal2" ]; then
imgsoquerytype="unrealtournament2004"
else
imgsoquerytype="${querytype}"
fi
fi

# Removes the passwords form all but details.
fn_info_messages_password_strip() {
if [ "${commandname}" != "DETAILS" ]; then
Expand Down Expand Up @@ -66,6 +89,11 @@ fn_info_messages_head() {
echo -e "Hostname"
echo -e "${HOSTNAME}"
echo -e ""
if [ -n "${querytype}" ]; then
echo -e "Is my Game Server Online?"
echo -e "https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}"
echo -e ""
fi
echo -e "Server Time"
echo -e "$(date)"
}
Expand Down Expand Up @@ -503,6 +531,11 @@ fn_info_messages_gameserver() {
else
echo -e "${lightblue}Status:\t${green}STARTED${default}"
fi

# ismygameserver.online
if [ -n "${querytype}" ]; then
echo -e "${lightblue}Query Check:\t${default}https://ismygameserver.online/${imgsoquerytype}/${alertip}:${queryport}"
fi
} | column -s $'\t' -t
echo -e ""
}
Expand Down

0 comments on commit 4e19c9b

Please sign in to comment.