From c6262f521185c4ecc374811739bca4b04fc44242 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 4 Apr 2025 15:08:15 -0400 Subject: [PATCH] Closes #10537 --- core/src/mindustry/core/NetClient.java | 2 +- core/src/mindustry/net/Administration.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 32c4543043..ac8803d3f4 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -276,7 +276,7 @@ public class NetClient implements ApplicationListener{ Events.fire(new PlayerChatEvent(player, message)); //log commands before they are handled - if(message.startsWith(netServer.clientCommands.getPrefix())){ + if(message.startsWith(netServer.clientCommands.getPrefix()) && Config.logCommands.bool()){ //log with brackets Log.info("<&fi@: @&fr>", "&lk" + player.plainName(), "&lw" + message); } diff --git a/core/src/mindustry/net/Administration.java b/core/src/mindustry/net/Administration.java index 0f64b9850a..d9104cb55e 100644 --- a/core/src/mindustry/net/Administration.java +++ b/core/src/mindustry/net/Administration.java @@ -515,7 +515,8 @@ public class Administration{ snapshotInterval = new Config("snapshotInterval", "Client entity snapshot interval in ms.", 200), autoPause = new Config("autoPause", "Whether the game should pause when nobody is online.", false), roundExtraTime = new Config("roundExtraTime", "Time before loading a new map after the gameover, in seconds.", 12), - maxLogLength = new Config("maxLogLength", "The Maximum log file size, in bytes.", 1024 * 1024 * 5); + maxLogLength = new Config("maxLogLength", "The Maximum log file size, in bytes.", 1024 * 1024 * 5), + logCommands = new Config("logCommands", "Whether player commands should be logged.", true); public final Object defaultValue; public final String name, key, description;