Don't send a Query detailed information packet if the challenge packet failed

This commit is contained in:
Jason M. Wood 2013-12-03 12:23:42 -07:00
parent ebbf91ec67
commit a503da9227

View File

@ -1128,8 +1128,10 @@ queryDetailedStatus() {
if [ "$(getPropertiesValue $1 'enable-query')" = "true" ]; then
# Send a challenge packet to the Minecraft query server.
TOKEN=$(querySendChallengePacket $1 | cut -f 3)
# Send an information request packet to the Minecraft query server.
RESPONSE=$(querySendDetailedInformationPacket $1 $TOKEN)
if [ -n "$TOKEN" ]; then
# Send an information request packet to the Minecraft query server.
RESPONSE=$(querySendDetailedInformationPacket $1 $TOKEN)
fi
fi
# Return the response.
printf "$RESPONSE\n"