refactor: bot.getServerString() to reduce mess

This commit is contained in:
ChomeNS
2025-02-16 08:03:38 +07:00
parent 4061bc5874
commit 8b5e706769
14 changed files with 25 additions and 21 deletions

View File

@@ -77,9 +77,9 @@ public class ConsolePlugin implements Completer {
if (line == null) return;
for (Bot bot : allBots) {
final String hostAndPort = bot.host + ":" + bot.port;
final String server = bot.getServerString();
if (!hostAndPort.equals(consoleServer) && !consoleServer.equals("all")) continue;
if (!server.equals(consoleServer) && !consoleServer.equals("all")) continue;
if (line.startsWith(prefix)) {
final ConsoleCommandContext context = new ConsoleCommandContext(bot, prefix);