diff --git a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java index 1ee82eec..d7879d10 100644 --- a/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java +++ b/proxy/src/main/java/net/md_5/bungee/conf/Configuration.java @@ -51,6 +51,7 @@ public class Configuration implements ProxyConfig * Whether we log proxy commands to the proxy log */ private boolean logCommands; + private boolean logPings = true; private int playerLimit = -1; private Collection disabledCommands; private int throttle = 4000; @@ -82,6 +83,7 @@ public class Configuration implements ProxyConfig uuid = adapter.getString( "stats", uuid ); onlineMode = adapter.getBoolean( "online_mode", onlineMode ); logCommands = adapter.getBoolean( "log_commands", logCommands ); + logPings = adapter.getBoolean( "log_pings", logPings ); playerLimit = adapter.getInt( "player_limit", playerLimit ); throttle = adapter.getInt( "connection_throttle", throttle ); ipForward = adapter.getBoolean( "ip_forward", ipForward ); diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index e5d361e3..a6bd3720 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -293,7 +293,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection } this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() ); - bungee.getLogger().log( Level.INFO, "{0} has connected", this ); + if ( bungee.getConfig().isLogPings() ) + { + bungee.getLogger().log( Level.INFO, "{0} has connected", this ); + } bungee.getPluginManager().callEvent( new PlayerHandshakeEvent( InitialHandler.this, handshake ) ); @@ -306,6 +309,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection break; case 2: // Login + if ( !bungee.getConfig().isLogPings() ) + { + bungee.getLogger().log( Level.INFO, "{0} has connected", this ); + } thisState = State.USERNAME; ch.setProtocol( Protocol.LOGIN );