mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-12-15 03:17:40 +00:00
25w22a Fix unicode usernames and remove restrictions in bungee
This commit is contained in:
@@ -122,16 +122,18 @@ public class InitialHandler extends PacketHandler implements PendingConnection {
|
||||
}
|
||||
String un = handshake.getUsername();
|
||||
if (un.length() < 3) {
|
||||
this.disconnect("Username must be at least 3 characters");
|
||||
return;
|
||||
System.err.println("Username is under 3 characters!");
|
||||
// this.disconnect("Username must be at least 3 characters");
|
||||
// return;
|
||||
}
|
||||
if (un.length() > 16) {
|
||||
this.disconnect("Cannot have username longer than 16 characters");
|
||||
return;
|
||||
}
|
||||
if(!un.equals(un.replaceAll("[^A-Za-z0-9\\-_]", "_").trim())) {
|
||||
this.disconnect("Go fuck yourself");
|
||||
return;
|
||||
System.err.println("Potentially invalid unicode username detected");
|
||||
// this.disconnect("Go fuck yourself");
|
||||
// return;
|
||||
}
|
||||
if (BungeeCord.getInstance().tokenVerify.isEmpty()) {
|
||||
String hostname = handshake.getHost();
|
||||
|
||||
Reference in New Issue
Block a user