From a8d62d6115c5249261962c14ca1de0d54b345081 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 17 Sep 2021 07:58:10 +0200 Subject: [PATCH] Fix inversion + debugoutput Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/Node.java | 1 + src/de/steamwar/bungeecore/commands/StatCommand.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/Node.java b/src/de/steamwar/bungeecore/Node.java index f0afc097..d63093d0 100644 --- a/src/de/steamwar/bungeecore/Node.java +++ b/src/de/steamwar/bungeecore/Node.java @@ -195,6 +195,7 @@ public abstract class Node { c = 1; } cores = c; + BungeeCore.get().getLogger().log(Level.INFO, "Adding node " + remote + " with " + cores + " cores."); synchronized (nodes) { nodes.add(this); diff --git a/src/de/steamwar/bungeecore/commands/StatCommand.java b/src/de/steamwar/bungeecore/commands/StatCommand.java index ade3705f..b633fb51 100644 --- a/src/de/steamwar/bungeecore/commands/StatCommand.java +++ b/src/de/steamwar/bungeecore/commands/StatCommand.java @@ -40,7 +40,7 @@ public class StatCommand extends BasicCommand { try { Process process = new ProcessBuilder("ps", "x").start(); new BufferedReader(new InputStreamReader(process.getInputStream())).lines().forEach(s -> { - if (s.contains("--port")) + if (!s.contains("--port")) return; serverCount.compute( s.contains("ssh -L") ? s.substring(s.indexOf("ssh -L") + 6).split(" ")[2] : "local",