From 2b3e4789c6df2bd91d314b3f859b95e27e7e85d5 Mon Sep 17 00:00:00 2001 From: 7cc5c4f330d47060 Date: Thu, 3 Oct 2024 15:05:22 -0400 Subject: [PATCH] Add local hiding of server IPs in the server command --- commands/about.js | 13 +++++++++++++ lang/en-US.json | 1 + 2 files changed, 14 insertions(+) diff --git a/commands/about.js b/commands/about.js index b5daa65..acb413d 100755 --- a/commands/about.js +++ b/commands/about.js @@ -222,6 +222,19 @@ const aboutServer = function (c) { const displayServerList = function (c) { index.bots.forEach((item, i) => { + if(c.bot.id == i && c.bot.host.options.hideLocally){ + c.reply({ + translate: getMessage(c.lang, "command.about.serverList.hideLocally"), + color: c.colors.secondary, + with: [ + { + text: i.toString(), + color: c.colors.primary + } + ] + }); + return; + } if (item.host.options && item.host.options.hidden && c.verify !== 2 && c.bot.id !== i) return let message = 'command.about.serverListItem' if (c.bot.id === i) message = 'command.about.serverListItem.thisServer' diff --git a/lang/en-US.json b/lang/en-US.json index e1066d9..5442fdb 100755 --- a/lang/en-US.json +++ b/lang/en-US.json @@ -121,6 +121,7 @@ "command.about.serverInfo.os.android.model": "Device model", "command.about.serverInfo.botName": "Bot name", "command.about.serverInfo.botVer": "Bot version", + "command.about.serverList.hideLocally": "Server %s has been hidden from the server list.", "command.about.serverListItem": "Server %s - %s", "command.about.serverListItem.thisServer": "Server %s - %s (this server)", "command.tpr.success": "Teleporting %s to %s, %s, %s",