Hide ip address in initial and legacy connections (#1025)
This commit is contained in:
@@ -236,7 +236,12 @@ public class HandshakeSessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[legacy connection] " + this.getRemoteAddress().toString();
|
||||
boolean isPlayerAddressLoggingEnabled = connection.server.getConfiguration()
|
||||
.isPlayerAddressLoggingEnabled();
|
||||
String playerIp =
|
||||
isPlayerAddressLoggingEnabled
|
||||
? this.getRemoteAddress().toString() : "<ip address withheld>";
|
||||
return "[legacy connection] " + playerIp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -75,7 +75,12 @@ public final class InitialInboundConnection implements VelocityInboundConnection
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[initial connection] " + connection.getRemoteAddress().toString();
|
||||
boolean isPlayerAddressLoggingEnabled = connection.server.getConfiguration()
|
||||
.isPlayerAddressLoggingEnabled();
|
||||
String playerIp =
|
||||
isPlayerAddressLoggingEnabled
|
||||
? connection.getRemoteAddress().toString() : "<ip address withheld>";
|
||||
return "[initial connection] " + playerIp;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user