diff --git a/Plugins/ScriptPlugins/ServerBanner.js b/Plugins/ScriptPlugins/ServerBanner.js index efec72a4..3094332d 100644 --- a/Plugins/ScriptPlugins/ServerBanner.js +++ b/Plugins/ScriptPlugins/ServerBanner.js @@ -41,6 +41,7 @@ const plugin = { serverOrderCache[startEvent.server.gameCode].push(startEvent.server); serverOrderCache[startEvent.server.gameCode].sort((a, b) => b.clientNum - a.clientNum); + serverOrderCache.sort((a, b) => b[Object.keys(b)[0].clientNum] - b[Object.keys(a)[0].clientNum]); if (lookupComplete) { return; @@ -49,9 +50,9 @@ const plugin = { const lookupIp = startEvent.server.resolvedIpEndPoint.address.isInternal() ? this.manager.externalIPAddress : startEvent.server.resolvedIpEndPoint.toString().split(':')[0]; - + this.logger.logInformation('Looking up server location for IP {IP}', lookupIp); - + this.scriptHelper.getUrl(`https://ipinfo.io/${lookupIp}/country`, (result) => { let error = true; @@ -274,7 +275,7 @@ const plugin = {
-
Show Embed
+
Show Embed
'; + response += '' return response; };