Waterfall/BungeeCord-Patches/0020-Improve-server-list-ping-logging.patch
Shane Freeder 8075dbe95d
Updated Upstream (BungeeCord)
Upstream has released updates that appears 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:
e93c762f #2921: ClickEvent without value exceptions in window title
023f407b #2928: Add IPOther special plugin message
64e4f465 #2931: Fix exceptions on ChatColor.of(Color) due to truncation
2020-08-29 12:11:57 +01:00

74 lines
3.2 KiB
Diff

From 7746bcf3c90d6015eb497d3eb2a27b8102df6d9e 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 eb8ae99a..934ad406 100644
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
@@ -442,6 +442,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 a859195e..b9783a4c 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
@@ -654,6 +654,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 853d717a..7ca502c0 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
@@ -653,20 +653,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 49fec0d7..a2f36f23 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
@@ -276,6 +276,6 @@ public class UpstreamBridge extends PacketHandler
@Override
public String toString()
{
- return "[" + con.getName() + "] -> UpstreamBridge";
+ return "[" + con.getAddress() + "|" + con.getName() + "] -> UpstreamBridge";
}
}
--
2.28.0