From 5571e9317f0c3087019031d5ad9aeffb6344f4ef Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sat, 8 Apr 2023 15:43:47 -0500 Subject: [PATCH] server banner tweaks --- Plugins/ScriptPlugins/ServerBanner.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; };