Explorar el Código

fix(mc): correct the of counting players online on Minecraft servers via gamedig

Jimmy Maple hace 1 año
padre
commit
6adf4da6d8
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      lgsm/modules/query_gamedig.sh

+ 1 - 3
lgsm/modules/query_gamedig.sh

@@ -42,9 +42,7 @@ if [ "$(command -v "${gamedigbinary}" 2> /dev/null)" ] && [ "$(command -v jq 2>
 		fi
 
 		# numplayers.
-		if [ "${querytype}" == "minecraft" ]; then
-			gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length-1')
-		elif [ "${querytype}" == "teamspeak3" ]; then
+		if [ "${querytype}" == "teamspeak3" ]; then
 			gdplayers=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_clientsonline')
 		else
 			gdplayers=$(echo "${gamedigraw}" | jq -re '.players | length')