ok when ppl try 2 log in like say with a name that i dont like
its supose 2 disconnect them
like lets say some1 trys 2 log in with an extra space like this
"bob the bilder " or " bob the bilder" or even " bob the bilder "
it leaves them as online, they dont appear online tho, they appear as a null
and my anti mas ac thing makes it so only 2 ppl can login per ip
so i m wondering, how i make it so it really disconnects them so if they put in an invalid username or invalid password or stuff like that, it really disconnects them
this is my code
Code:
if (!playerName.matches("[A-Za-z0-9]+[A-Za-z0-9_ ]*[A-Za-z0-9]+") || playerName.matches("[A-Za-z0-9_ ]*(__|_ | _| )+[A-Za-z0-9_ ]*")) {
System.out.println("Bad Username: Failed for '"+playerName+"'");
returnCode = 4;
disconnected = true;
return;
}
so help plawks ppl get pissed and it pisses me off....