2019-04-30 05:19:02 +02:00
|
|
|
From 6588b586f4be71f28c761811fc857a43c7b818f8 Mon Sep 17 00:00:00 2001
|
2016-05-28 18:34:39 +02:00
|
|
|
From: Janmm14 <computerjanimaus@yahoo.de>
|
|
|
|
Date: Sat, 12 Dec 2015 23:43:30 +0100
|
2019-03-30 19:01:17 +01:00
|
|
|
Subject: [PATCH] Improve server list ping logging
|
2016-05-28 18:34:39 +02:00
|
|
|
|
2019-03-30 19:01:17 +01:00
|
|
|
This functionality of this patch was adopted upstream, however, this
|
|
|
|
patch remains for a few misc improvements around here
|
2016-05-28 18:34:39 +02:00
|
|
|
|
2016-11-26 21:39:19 +01:00
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
2019-04-30 05:19:02 +02:00
|
|
|
index e32a06c2..251e8726 100644
|
2016-11-26 21:39:19 +01:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/ServerConnector.java
|
2019-04-30 05:19:02 +02:00
|
|
|
@@ -415,6 +415,6 @@ public class ServerConnector extends PacketHandler
|
2016-11-26 21:39:19 +01:00
|
|
|
@Override
|
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
- return "[" + user.getName() + "] <-> ServerConnector [" + target.getName() + "]";
|
|
|
|
+ return "[" + user.getName() + "|" + user.getAddress() + "] <-> ServerConnector [" + target.getName() + "]";
|
|
|
|
}
|
|
|
|
}
|
2016-05-28 18:34:39 +02:00
|
|
|
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
|
2019-04-23 10:09:26 +02:00
|
|
|
index 1911923c..2eff743d 100644
|
2016-05-28 18:34:39 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java
|
2019-04-23 10:09:26 +02:00
|
|
|
@@ -597,6 +597,6 @@ public class DownstreamBridge extends PacketHandler
|
2016-05-28 18:34:39 +02:00
|
|
|
@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
|
2019-04-23 10:09:26 +02:00
|
|
|
index a43082e8..4731cb9d 100644
|
2016-05-28 18:34:39 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
2019-04-23 10:09:26 +02:00
|
|
|
@@ -295,16 +295,15 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
2016-05-28 18:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
this.virtualHost = InetSocketAddress.createUnresolved( handshake.getHost(), handshake.getPort() );
|
2018-09-04 04:12:52 +02:00
|
|
|
- if ( bungee.getConfig().isLogPings() )
|
|
|
|
- {
|
|
|
|
- bungee.getLogger().log( Level.INFO, "{0} has connected", this );
|
|
|
|
- }
|
2016-05-28 18:34:39 +02:00
|
|
|
|
|
|
|
bungee.getPluginManager().callEvent( new PlayerHandshakeEvent( InitialHandler.this, handshake ) );
|
|
|
|
|
|
|
|
switch ( handshake.getRequestedProtocol() )
|
|
|
|
{
|
|
|
|
case 1:
|
2019-03-30 19:01:17 +01:00
|
|
|
+ if (bungee.getConfig().isLogPings()) {
|
2016-05-28 18:34:39 +02:00
|
|
|
+ bungee.getLogger().log( Level.INFO, "{0} is pinging", this );
|
|
|
|
+ }
|
|
|
|
// Ping
|
|
|
|
thisState = State.STATUS;
|
|
|
|
ch.setProtocol( Protocol.STATUS );
|
2019-04-23 10:09:26 +02:00
|
|
|
@@ -628,7 +627,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
2016-05-28 18:34:39 +02:00
|
|
|
@Override
|
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
- return "[" + ( ( getName() != null ) ? getName() : getAddress() ) + "] <-> InitialHandler";
|
|
|
|
+ return "[" + getAddress() + ( 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
|
2019-02-20 19:51:36 +01:00
|
|
|
index de916f6e..bdaee47e 100644
|
2016-05-28 18:34:39 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/UpstreamBridge.java
|
2018-12-21 16:24:26 +01:00
|
|
|
@@ -267,6 +267,6 @@ public class UpstreamBridge extends PacketHandler
|
2016-05-28 18:34:39 +02:00
|
|
|
@Override
|
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
- return "[" + con.getName() + "] -> UpstreamBridge";
|
|
|
|
+ return "[" + con.getAddress() + "|" + con.getName() + "] -> UpstreamBridge";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2019-03-30 17:09:06 +01:00
|
|
|
2.21.0
|
2016-05-28 18:34:39 +02:00
|
|
|
|