Remove username replacement hack

This commit is contained in:
Jgunishka 2019-08-21 21:25:45 +03:00
parent a0457d2a03
commit 66638b63aa

View File

@ -49,37 +49,7 @@ public class LoginAction implements V086Action, V086ServerEventHandler
UserInformation userInfo = (UserInformation) message; UserInformation userInfo = (UserInformation) message;
KailleraUser user = clientHandler.getUser(); KailleraUser user = clientHandler.getUser();
user.setName(userInfo.getUserName());
//Username Hacking
if(user.isLoggedIn()){
for (KailleraUser i : user.getServer().getUsers()){
if(i.getConnectSocketAddress().getAddress().getHostAddress().equals(user.getConnectSocketAddress().getAddress().getHostAddress())){
try{i.quit("Forceful Exit: Dupe");} catch(Exception e){}
}
}
throw new IllegalArgumentException("Forceful Exit: Duplicate = " + user.getName() + ", " + user.getSocketAddress().getAddress().getHostAddress());
}
String m = userInfo.getUserName();
String temp = m;
temp = temp.replace(" ", "");
if(temp.toLowerCase().contains("ggpo.net")){
m = "http://www.God-Weapon.com";
}
else if(temp.toLowerCase().contains("2dfighter.com")){
m = "http://www.God-Weapon.com";
}
//69.90.34.245
else if(temp.toLowerCase().contains("69") && temp.toLowerCase().contains("90") && temp.toLowerCase().contains("34") && temp.toLowerCase().contains("245")){
m = "k.god-weapon.com:27888";
}
else if(temp.toLowerCase().contains("209") && temp.toLowerCase().contains("144") && temp.toLowerCase().contains("21") && temp.toLowerCase().contains("174")){
m = "k.god-weapon.com:27888";
}
user.setName(m);
user.setClientType(userInfo.getClientType()); user.setClientType(userInfo.getClientType());
user.setSocketAddress(clientHandler.getRemoteSocketAddress()); user.setSocketAddress(clientHandler.getRemoteSocketAddress());
user.setConnectionType(userInfo.getConnectionType()); user.setConnectionType(userInfo.getConnectionType());