Waterfall/BungeeCord-Patches/0019-Improve-server-list-ping-logging.patch
Shane Freeder 6ca6b706df
Updated Upstream (BungeeCord) (Closes #771)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
69631561 #3366: Improve consistency and appearance of default translations
dd3f8200 #3363, #3369: Implement new ServerData packet to stop MOTD data from servers
2022-08-14 18:48:46 +01:00

74 lines
3.2 KiB
Diff

From a2d3b8db72aabd1de2bf7c573381daf0eb36f763 Mon Sep 17 00:00:00 2001
From: Janmm14 <computerjanimaus@yahoo.de>
Date: Sat, 12 Dec 2015 23:43:30 +0100
Subject: [PATCH] Improve server list ping logging
This functionality of this patch was adopted upstream, however, this
patch remains for a few misc improvements around here
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
index aa721cdc..981b0200 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -460,6 +460,6 @@ public class ServerConnector extends PacketHandler
@Override
public String toString()
{
- return "[" + user.getName() + "] <-> ServerConnector [" + target.getName() + "]";
+ return "[" + user.getName() + "|" + user.getAddress() + "] <-> ServerConnector [" + target.getName() + "]";
}
}
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
index 9c724115..a0301a95 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
@@ -691,6 +691,6 @@ public class DownstreamBridge extends PacketHandler
@Override
public String toString()
{
- return "[" + con.getName() + "] <-> DownstreamBridge <-> [" + server.getInfo().getName() + "]";
+ return "[" + con.getAddress() + "|" + con.getName() + "] <-> DownstreamBridge <-> [" + server.getInfo().getName() + "]";
}
}
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 94db72b0..562afbaa 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
@@ -718,20 +718,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
@Override
public String toString()
{
- StringBuilder sb = new StringBuilder();
- sb.append( '[' );
-
- String currentName = getName();
- if ( currentName != null )
- {
- sb.append( currentName );
- sb.append( ',' );
- }
-
- sb.append( getSocketAddress() );
- sb.append( "] <-> InitialHandler" );
-
- return sb.toString();
+ return "[" + getSocketAddress() + ( getName() != null ? "|" + getName() : "" ) + "] <-> InitialHandler";
}
@Override
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
index 147e5b20..d560cef6 100644
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
@@ -313,6 +313,6 @@ public class UpstreamBridge extends PacketHandler
@Override
public String toString()
{
- return "[" + con.getName() + "] -> UpstreamBridge";
+ return "[" + con.getAddress() + "|" + con.getName() + "] -> UpstreamBridge";
}
}
--
2.37.1