From 3e0a36dbbd9b958fd7df6ffb09eff07311ed61e9 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Apr 2021 22:12:09 +0100 Subject: [PATCH] Fix dangling sout --- .../Validate-bungee-forwarded-hostname.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Validate-bungee-forwarded-hostname.patch b/Spigot-Server-Patches/Validate-bungee-forwarded-hostname.patch index f5c4c99cb6..515786dd4a 100644 --- a/Spigot-Server-Patches/Validate-bungee-forwarded-hostname.patch +++ b/Spigot-Server-Patches/Validate-bungee-forwarded-hostname.patch @@ -31,10 +31,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 String[] split = packethandshakinginsetprotocol.hostname.split("\00"); if ( split.length == 3 || split.length == 4 ) { + // Paper start -+ if (!BYPASS_HOSTCHECK && !validate(split[0])) { ++ if (!BYPASS_HOSTCHECK && !validate(split[1])) { + final ChatMessage message = new ChatMessage("Invalid hostname"); -+ this.c.sendPacket(new PacketLoginOutDisconnect(message)); -+ this.c.close(message); ++ this.getNetworkManager().sendPacket(new PacketLoginOutDisconnect(message)); ++ this.getNetworkManager().close(message); + return; + } + // Paper end @@ -51,4 +51,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + //noinspection UnstableApiUsage + return InetAddresses.isUriInetAddress(hostname); + } ++ // Paper end }