diff --git a/Waterfall-Proxy-Patches/0028-Antibot-System.patch b/Waterfall-Proxy-Patches/0028-Antibot-System.patch index 1872744..b3c74fc 100644 --- a/Waterfall-Proxy-Patches/0028-Antibot-System.patch +++ b/Waterfall-Proxy-Patches/0028-Antibot-System.patch @@ -1,4 +1,4 @@ -From 4cf1d03c88fcca0a11057eed5ca57581ad9cc618 Mon Sep 17 00:00:00 2001 +From 3274980088aa9779262e38e0d48beb33ba7d1a60 Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Fri, 4 Mar 2022 13:35:53 -0300 Subject: [PATCH] Antibot System @@ -473,10 +473,10 @@ index 00000000..007be392 +} diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/CheckManager.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/CheckManager.java new file mode 100644 -index 00000000..1503ac95 +index 00000000..6af48a4d --- /dev/null +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/CheckManager.java -@@ -0,0 +1,40 @@ +@@ -0,0 +1,44 @@ +package dev._2lstudios.flamecord.antibot; + +import dev._2lstudios.flamecord.configuration.FlameCordConfiguration; @@ -499,6 +499,8 @@ index 00000000..1503ac95 + private final ReconnectCheck reconnectCheck; + @Getter + private final PacketsCheck packetsCheck; ++ @Getter ++ private final ProxyCheck proxyCheck; + + public CheckManager(final AddressDataManager addressDataManager, final FlameCordConfiguration flameCordConfiguration) { + this.accountsCheck = new AccountsCheck(addressDataManager); @@ -509,8 +511,10 @@ index 00000000..1503ac95 + this.ratelimitCheck = new RatelimitCheck(addressDataManager); + this.reconnectCheck = new ReconnectCheck(addressDataManager); + this.packetsCheck = new PacketsCheck(); ++ this.proxyCheck = new ProxyCheck(addressDataManager); + + this.countryCheck.load(); ++ this.proxyCheck.updateProxies(); + } + + public void unload() { @@ -1081,6 +1085,99 @@ index 00000000..68555de3 + return repeatCount; + } +} +diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/ProxyCheck.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/ProxyCheck.java +new file mode 100644 +index 00000000..eefc2153 +--- /dev/null ++++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/ProxyCheck.java +@@ -0,0 +1,87 @@ ++package dev._2lstudios.flamecord.antibot; ++ ++import java.io.BufferedReader; ++import java.io.InputStreamReader; ++import java.net.HttpURLConnection; ++import java.net.SocketAddress; ++import java.net.URL; ++import java.util.logging.Level; ++ ++import dev._2lstudios.flamecord.FlameCord; ++ ++public class ProxyCheck { ++ private AddressDataManager addressDataManager; ++ public String proxies = ""; ++ ++ public ProxyCheck(AddressDataManager addressDataManager) { ++ this.addressDataManager = addressDataManager; ++ } ++ ++ public void updateProxies() { ++ // define the websites to get the proxies from ++ String[] websites = { ++ "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt", ++ "https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list-raw.txt", ++ "https://raw.githubusercontent.com/mertguvencli/http-proxy-list/main/proxy-list/data.txt" ++ }; ++ ++ // send updating proxies message ++ FlameCord.getInstance().getLoggerWrapper().log(Level.INFO, ++ "Updating proxy database from " + websites.length + " websites..."); ++ ++ // create a string builder to store the content ++ StringBuilder content = new StringBuilder(); ++ ++ // loop through each website ++ for (String website : websites) { ++ try { ++ // create a URL object with the website ++ URL url = new URL(website); ++ ++ // open a connection to the URL ++ HttpURLConnection con = (HttpURLConnection) url.openConnection(); ++ ++ // set the request method to GET ++ con.setRequestMethod("GET"); ++ ++ // get the response code ++ int responseCode = con.getResponseCode(); ++ ++ // if the response code is OK (200) ++ if (responseCode == HttpURLConnection.HTTP_OK) { ++ // create a buffered reader to read the response ++ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); ++ ++ // read each line of the response and append it to the content ++ String inputLine; ++ while ((inputLine = in.readLine()) != null) { ++ content.append(inputLine); ++ content.append("\n"); ++ } ++ ++ // close the buffered reader ++ in.close(); ++ } else { ++ // print an error message ++ FlameCord.getInstance().getLoggerWrapper().log(Level.INFO, "GET request failed for " + website); ++ } ++ } catch (Exception ex) { ++ // print an error message ++ FlameCord.getInstance().getLoggerWrapper().log(Level.INFO, "GET request failed for " + website); ++ } ++ } ++ ++ // set the updated proxy list ++ proxies = content.toString(); ++ } ++ ++ public boolean check(String ip) { ++ return !proxies.equals("") && proxies.contains(ip); ++ } ++ ++ public boolean check(SocketAddress address) { ++ AddressData addressData = addressDataManager.getAddressData(address); ++ ++ return check(addressData.getHostString()); ++ } ++} diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/RatelimitCheck.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/antibot/RatelimitCheck.java new file mode 100644 index 00000000..51c1866e @@ -1482,10 +1579,10 @@ index 14665b1f..0f12f4ae 100644 save(configuration, configurationFile); } diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -index ae179438..6175d8e2 100644 +index ae179438..35277c4c 100644 --- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -@@ -80,6 +80,22 @@ public class MessagesConfiguration extends FlameConfig { +@@ -80,6 +80,23 @@ public class MessagesConfiguration extends FlameConfig { setIfUnexistant("command_ip", "&9IP of {0} is {1}", configuration); setIfUnexistant("illegal_chat_characters", "&cIllegal characters in chat ({0})", configuration); @@ -1498,6 +1595,7 @@ index ae179438..6175d8e2 100644 + setIfUnexistant("antibot_ratelimit", "&c&lFlameCord\n\n&cYou are connecting too fast! ({0})\n\n&cError? Contact us on discord.gg/gF36AT3", configuration); + setIfUnexistant("antibot_reconnect", "&c&lFlameCord\n\n&cReconnect {0} more times to enter!\n\n&cError? Contact us on discord.gg/gF36AT3", configuration); + setIfUnexistant("antibot_country", "&c&lFlameCord\n\n&cYour country {0} is blacklisted!\n\n&cError? Contact us on discord.gg/gF36AT3", configuration); ++ setIfUnexistant("antibot_proxy", "&c&lFlameCord\n\n&cYou are using a Proxy/VPN! ({0})\n\n&cError? Contact us on discord.gg/gF36AT3", configuration); + setIfUnexistant("antibot_stats", "&c&lFlameCord Antibot Stats\n &7■ Total Pings: &a{0}\n &7■ Total Connections: &b{1}\n\n &7■ Current Pings: &a{2}\n &7■ Current Connections: &b{3}", configuration); + + setIfUnexistant("flamecord_firewall_help", "&c/flamecord firewall ", configuration); @@ -1708,7 +1806,7 @@ index fb81adee..173b47f3 100644 } } diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 51da85ac..998445a7 100644 +index 6d798917..23d89781 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -533,6 +533,11 @@ public class BungeeCord extends ProxyServer @@ -1724,7 +1822,7 @@ index 51da85ac..998445a7 100644 // Need to close loggers after last message! org.apache.logging.log4j.LogManager.shutdown(); // Waterfall 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 d65884ae..29afa82c 100644 +index d65884ae..8d7bb6bf 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 @@ -22,8 +22,8 @@ import javax.crypto.SecretKey; @@ -1761,19 +1859,25 @@ index d65884ae..29afa82c 100644 this.handshake = handshake; ch.setVersion( handshake.getProtocolVersion() ); ch.getHandle().pipeline().remove( PipelineUtils.LEGACY_KICKER ); -@@ -442,6 +458,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -442,6 +458,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection return; } + // FlameCord start - Antibot System + AddressData addressData = FlameCord.getInstance().getAddressDataManager().getAddressData( ch.getRemoteAddress() ); + CheckManager checkManager = FlameCord.getInstance().getCheckManager(); ++ ++ if ( checkManager.getProxyCheck().check( ch.getRemoteAddress() ) ) ++ { ++ disconnect( bungee.getTranslation( "antibot_proxy" ) ); ++ return; ++ } + // FlameCord end - Antibot System + switch ( handshake.getRequestedProtocol() ) { case 1: -@@ -453,6 +474,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -453,6 +480,17 @@ public class InitialHandler extends PacketHandler implements PendingConnection } thisState = State.STATUS; ch.setProtocol( Protocol.STATUS ); @@ -1791,7 +1895,7 @@ index d65884ae..29afa82c 100644 break; case 2: // Login -@@ -464,6 +496,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -464,6 +502,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection thisState = State.USERNAME; ch.setProtocol( Protocol.LOGIN ); @@ -1808,7 +1912,7 @@ index d65884ae..29afa82c 100644 if ( !ProtocolConstants.SUPPORTED_VERSION_IDS.contains( handshake.getProtocolVersion() ) ) { if ( handshake.getProtocolVersion() > bungee.getProtocolVersion() ) -@@ -527,6 +569,38 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -527,6 +575,38 @@ public class InitialHandler extends PacketHandler implements PendingConnection return; } diff --git a/Waterfall-Proxy-Patches/0029-Allow-Invalid-Names.patch b/Waterfall-Proxy-Patches/0029-Allow-Invalid-Names.patch index 2f46e92..7629146 100644 --- a/Waterfall-Proxy-Patches/0029-Allow-Invalid-Names.patch +++ b/Waterfall-Proxy-Patches/0029-Allow-Invalid-Names.patch @@ -1,11 +1,11 @@ -From 1e3a2975964623026cc90326efc27ccafb47ae51 Mon Sep 17 00:00:00 2001 +From 0223fa7bcd9bc22c97dc8ee8fe26966a62ec596f Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Fri, 4 Mar 2022 14:09:35 -0300 Subject: [PATCH] Allow Invalid Names diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java -index 0f12f4ae6..6f463b9c6 100644 +index 0f12f4ae..6f463b9c 100644 --- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/FlameCordConfiguration.java @@ -15,6 +15,10 @@ import net.md_5.bungee.config.Configuration; @@ -30,10 +30,10 @@ index 0f12f4ae6..6f463b9c6 100644 } } 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 b88e64526..e8c14c552 100644 +index 8d7bb6bf..95f0e52c 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 -@@ -528,7 +528,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -534,7 +534,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection { Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" ); diff --git a/Waterfall-Proxy-Patches/0035-Dont-Process-Links-For-Kick-Messages.patch b/Waterfall-Proxy-Patches/0035-Dont-Process-Links-For-Kick-Messages.patch index ef5d401..8d603dc 100644 --- a/Waterfall-Proxy-Patches/0035-Dont-Process-Links-For-Kick-Messages.patch +++ b/Waterfall-Proxy-Patches/0035-Dont-Process-Links-For-Kick-Messages.patch @@ -1,4 +1,4 @@ -From ab1e5d100f2d678f1471fa83226dc9a5af2d370b Mon Sep 17 00:00:00 2001 +From e00613f6a9cb19fbaddec2c4d51bd7feb6fcceea Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Tue, 10 Jan 2023 16:37:13 -0300 Subject: [PATCH] Dont Process Links For Kick Messages @@ -117,10 +117,10 @@ index 4371374a..2bb27e67 100644 * The text of the component that will be displayed to the client */ 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 e8c14c55..6d0719a0 100644 +index 95f0e52c..d2406a7e 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 -@@ -833,7 +833,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -839,7 +839,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection { if ( canSendKickMessage() ) { diff --git a/Waterfall-Proxy-Patches/0036-Bungee-Plugins-Command.patch b/Waterfall-Proxy-Patches/0036-Bungee-Plugins-Command.patch index a40ebcc..54048b5 100644 --- a/Waterfall-Proxy-Patches/0036-Bungee-Plugins-Command.patch +++ b/Waterfall-Proxy-Patches/0036-Bungee-Plugins-Command.patch @@ -1,14 +1,14 @@ -From f37bca815bffe22461c5b2760596ef18d56a1070 Mon Sep 17 00:00:00 2001 +From 0923414d9063d29b476aaba8c1d2dc0c32f7d518 Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Wed, 11 Jan 2023 10:14:12 -0300 Subject: [PATCH] Bungee Plugins Command diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -index 6175d8e2d..2ea33a94b 100644 +index 35277c4c..e385aaab 100644 --- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -@@ -96,6 +96,11 @@ public class MessagesConfiguration extends FlameConfig { +@@ -97,6 +97,11 @@ public class MessagesConfiguration extends FlameConfig { setIfUnexistant("flamecord_firewall_remove", "&cThe ip {0} was removed from the firewall!", configuration); // FlameCord end - Antibot System @@ -22,7 +22,7 @@ index 6175d8e2d..2ea33a94b 100644 diff --git a/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeePluginsCommand.java b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeePluginsCommand.java new file mode 100644 -index 000000000..2e20e9dca +index 00000000..2e20e9dc --- /dev/null +++ b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeePluginsCommand.java @@ -0,0 +1,45 @@ @@ -72,7 +72,7 @@ index 000000000..2e20e9dca + } +} diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index 62712330e..ec5fd4af2 100644 +index 23d89781..e03c7877 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -11,6 +11,7 @@ import com.google.gson.Gson; diff --git a/Waterfall-Proxy-Patches/0037-Bungee-IP-Command.patch b/Waterfall-Proxy-Patches/0037-Bungee-IP-Command.patch index 0bc48e2..62148df 100644 --- a/Waterfall-Proxy-Patches/0037-Bungee-IP-Command.patch +++ b/Waterfall-Proxy-Patches/0037-Bungee-IP-Command.patch @@ -1,14 +1,14 @@ -From 79f33268f3f154170f55362decf8fcc8b99a68f8 Mon Sep 17 00:00:00 2001 +From 15952aaaac9f80d0bf3f1d7adbd42e947572d78f Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Sun, 15 Jan 2023 10:12:45 -0300 Subject: [PATCH] Bungee IP Command diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -index 2ea33a94b..e42bb29d5 100644 +index e385aaab..4d9ed0c7 100644 --- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -@@ -101,6 +101,12 @@ public class MessagesConfiguration extends FlameConfig { +@@ -102,6 +102,12 @@ public class MessagesConfiguration extends FlameConfig { setIfUnexistant("flamecord_bplugins_separator", ", ", configuration); setIfUnexistant("flamecord_bplugins_header", "&aPlugins ({0}): ", configuration); @@ -23,7 +23,7 @@ index 2ea33a94b..e42bb29d5 100644 diff --git a/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeeIPCommand.java b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeeIPCommand.java new file mode 100644 -index 000000000..85313491e +index 00000000..85313491 --- /dev/null +++ b/proxy/src/main/java/dev/_2lstudios/flamecord/commands/BungeeIPCommand.java @@ -0,0 +1,45 @@ @@ -73,7 +73,7 @@ index 000000000..85313491e + } +} diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java -index ec5fd4af2..f5059666e 100644 +index e03c7877..63ba56f4 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -11,6 +11,7 @@ import com.google.gson.Gson; diff --git a/Waterfall-Proxy-Patches/0038-List-Command-Format.patch b/Waterfall-Proxy-Patches/0038-List-Command-Format.patch index b4d4ca0..80249e2 100644 --- a/Waterfall-Proxy-Patches/0038-List-Command-Format.patch +++ b/Waterfall-Proxy-Patches/0038-List-Command-Format.patch @@ -1,14 +1,14 @@ -From 4bdecd3bce63e87e3c1388cf7bf9c67a9fa2c6d0 Mon Sep 17 00:00:00 2001 +From a4b4d829121fafb58860f8d4478e68517d0d8b75 Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Sun, 15 Jan 2023 19:03:34 -0300 Subject: [PATCH] List Command Format diff --git a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -index e42bb29d..555319a7 100644 +index 4d9ed0c7..d64c5d7a 100644 --- a/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java +++ b/flamecord/src/main/java/dev/_2lstudios/flamecord/configuration/MessagesConfiguration.java -@@ -107,6 +107,9 @@ public class MessagesConfiguration extends FlameConfig { +@@ -108,6 +108,9 @@ public class MessagesConfiguration extends FlameConfig { setIfUnexistant("flamecord_bip_usage", "&c/bip ", configuration); setIfUnexistant("flamecord_bip", "&aInformation about {0}&a:\n&aUUID: &b{1}\n&aIP: &b{2}\n&aPing: &b{3}ms\n&aLocale: &b{4}\n&aView Distance: &b{5}\n&aCurrent Server: &b{6}", configuration); diff --git a/Waterfall-Proxy-Patches/0039-InitialHandler-Processing-State.patch b/Waterfall-Proxy-Patches/0039-InitialHandler-Processing-State.patch index 00c2732..8f664ee 100644 --- a/Waterfall-Proxy-Patches/0039-InitialHandler-Processing-State.patch +++ b/Waterfall-Proxy-Patches/0039-InitialHandler-Processing-State.patch @@ -1,11 +1,11 @@ -From 477817bdc183b430c925b7b3841e5b51ac632852 Mon Sep 17 00:00:00 2001 +From 63c29065199a914dad97bfeed9c8ded1ee8ff340 Mon Sep 17 00:00:00 2001 From: LinsaFTW <25271111+linsaftw@users.noreply.github.com> Date: Sun, 22 Jan 2023 09:41:36 -0300 Subject: [PATCH] InitialHandler Processing State 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 6d0719a0..8beed72f 100644 +index d2406a7e..348a91b2 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 @@ -135,6 +135,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection @@ -64,7 +64,7 @@ index 6d0719a0..8beed72f 100644 // FlameCord start - Antibot System // Close and firewall on invalid protocol int protocol = handshake.getRequestedProtocol(); -@@ -485,6 +504,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -491,6 +510,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection } // FlameCord end - Antibot System @@ -75,7 +75,7 @@ index 6d0719a0..8beed72f 100644 break; case 2: // Login -@@ -517,6 +540,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -523,6 +546,11 @@ public class InitialHandler extends PacketHandler implements PendingConnection } return; } @@ -87,7 +87,7 @@ index 6d0719a0..8beed72f 100644 break; default: throw new QuietException( "Cannot request protocol " + handshake.getRequestedProtocol() ); -@@ -527,6 +555,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -533,6 +561,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection public void handle(LoginRequest loginRequest) throws Exception { Preconditions.checkState( thisState == State.USERNAME, "Not expecting USERNAME" ); @@ -98,7 +98,7 @@ index 6d0719a0..8beed72f 100644 if ( !FlameCord.getInstance().getFlameCordConfiguration().isAllowInvalidNames() && !AllowedCharacters.isValidName( loginRequest.getData(), onlineMode ) ) { -@@ -634,6 +666,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -640,6 +672,9 @@ public class InitialHandler extends PacketHandler implements PendingConnection thisState = State.FINISHING; finish(); } @@ -108,7 +108,7 @@ index 6d0719a0..8beed72f 100644 } }; -@@ -647,6 +682,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection +@@ -653,6 +688,10 @@ public class InitialHandler extends PacketHandler implements PendingConnection Preconditions.checkState( thisState == State.ENCRYPT, "Not expecting ENCRYPT" ); Preconditions.checkState( EncryptionUtil.check( loginRequest.getPublicKey(), encryptResponse, request ), "Invalid verification" ); thisState = State.FINISHING; // Waterfall - move earlier - There is no verification of this later (and this is not API)