From fab0a9249b9d48f08e9eefbcd7c2142e8d2597b9 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 31 Jan 2024 21:30:48 -0700 Subject: [PATCH] ok, that works now --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e94db5d..7a30cfe 100755 --- a/index.js +++ b/index.js @@ -199,13 +199,15 @@ function checkServer(address) { data.keywords.split("-") data.address = address.split(":"); data.serverInfo = splitKeyword(data.keywords); + // Calculate outdated status, cant use less than anymore because of the way semver works and 1.10.0 appears as less than 1.9.9 + outdated = semver.lt(data.serverInfo.version, serverList.highestVersion) ? true : false; output = { "name": data.name, "address": data.address[0], "port": data.address[1], "password": data.visibility == 1 ? true : false, "version": data.serverInfo.version, - "outdated": data.serverInfo.version < serverList.highestVersion ? true : false, + "outdated": outdated, "dlc": data.serverInfo.dlc, "dlcString": data.serverInfo.dlcString, "tps": data.serverInfo.tps,