mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-16 07:15:14 +01:00
f48db6b757
The changes in 1.13 makes this limiter too easy to hit, breaking tab completion silently for users and causing a lot of confusion around tab completions not working, for this reason, it's cleaner to disable this for 1.13+ clients by default and defer this to the server, where better control is already provided for paper servers (and any other server will either not have broken tab completions, or can re-enable this limit if they wish to do so)
77 lines
3.4 KiB
Diff
77 lines
3.4 KiB
Diff
From 1447245c1b0233eefc07d701007d55a4fc5d24ea Mon Sep 17 00:00:00 2001
|
|
From: Gabriele C <sgdc3.mail@gmail.com>
|
|
Date: Thu, 8 Feb 2018 19:10:52 +0100
|
|
Subject: [PATCH] Optionally log InitialHandler connections
|
|
|
|
|
|
diff --git a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
index 47d4ab36..8680fd9b 100644
|
|
--- a/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
+++ b/api/src/main/java/net/md_5/bungee/api/ProxyConfig.java
|
|
@@ -163,6 +163,11 @@ public interface ProxyConfig
|
|
*/
|
|
boolean isLogServerListPing();
|
|
|
|
+ /**
|
|
+ * Whether we log InitialHandler connections
|
|
+ */
|
|
+ boolean isLogInitialHandlerConnections();
|
|
+
|
|
/**
|
|
* The supported versions
|
|
*/
|
|
diff --git a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
index b7e3dad0..d343e9b8 100644
|
|
--- a/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
+++ b/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java
|
|
@@ -16,6 +16,13 @@ public class WaterfallConfiguration extends Configuration {
|
|
*/
|
|
private boolean logServerListPing = false;
|
|
|
|
+ /**
|
|
+ * Whether we log InitialHandler connections
|
|
+ * <p>
|
|
+ * Default is true
|
|
+ */
|
|
+ private boolean logInitialHandlerConnections = true;
|
|
+
|
|
/**
|
|
* The supported versions displayed to the client
|
|
* <p>Default is a comma separated list of supported versions. For example 1.8.x, 1.9.x, 1.10.x</p>
|
|
@@ -48,6 +55,7 @@ public class WaterfallConfiguration extends Configuration {
|
|
YamlConfig config = new YamlConfig(new File("waterfall.yml"));
|
|
config.load(false); // Load, but no permissions
|
|
logServerListPing = config.getBoolean( "log_server_list_ping", logServerListPing );
|
|
+ logInitialHandlerConnections = config.getBoolean( "log_initial_handler_connections", logInitialHandlerConnections );
|
|
gameVersion = config.getString("game_version", "").isEmpty() ? Joiner.on(", ").join(ProtocolConstants.SUPPORTED_VERSIONS) : config.getString("game_version", "");
|
|
useNettyDnsResolver = config.getBoolean("use_netty_dns_resolver", useNettyDnsResolver);
|
|
// Throttling options
|
|
@@ -60,6 +68,11 @@ public class WaterfallConfiguration extends Configuration {
|
|
return logServerListPing;
|
|
}
|
|
|
|
+ @Override
|
|
+ public boolean isLogInitialHandlerConnections() {
|
|
+ return logInitialHandlerConnections;
|
|
+ }
|
|
+
|
|
@Override
|
|
public String getGameVersion() {
|
|
return gameVersion;
|
|
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 c546e7be..8f63e997 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
|
|
@@ -312,7 +312,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
break;
|
|
case 2:
|
|
// Login
|
|
- if ( !bungee.getConfig().isLogPings() )
|
|
+ if (BungeeCord.getInstance().getConfig().isLogInitialHandlerConnections() ) // Waterfall
|
|
{
|
|
bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
|
}
|
|
--
|
|
2.19.0
|
|
|