Nathan
June 18th, 2010, 03:45
i would of added this in snippets but theres no section for that.
ok in rs2login.java search. above that
p.stream.writeByte(returnCode);
add this
int ipconnections = 0;
for (int i = 0; i < Engine.players.length; i++) {
Player PC = Engine.players[i];
if (PC != null) {
if (PC.socket.socket.getInetAddress().getHostAddress( ).equals(
p.socket.socket.getInetAddress().getHostAddress()) ) {
// MATCHED IP
ipconnections += 1;
}
}
}
if (ipconnections >= 4) {
// More than 3 connections
returnCode = 9;
}
It will look something like this
p.newPassword = password;
p.loadCharacter();
if (password != null && p.password != null && !p.password.equals("") && !p.password.equals(password)) {
returnCode = 3;
} else {
p.password = password;
}
int ipconnections = 0;
for (int i = 0; i < Engine.players.length; i++) {
Player PC = Engine.players[i];
if (PC != null) {
if (PC.socket.socket.getInetAddress().getHostAddress( ).equals(
p.socket.socket.getInetAddress().getHostAddress()) ) {
// MATCHED IP
ipconnections += 1;
}
}
}
if (ipconnections >= 4) {
// More than 3 connections
returnCode = 9;
}
p.stream.writeByte(returnCode);
wat this does is only 3 accounts from 1 ip is alowed to log in. tested. works 100% instead of lots of bots logging in only 3 bots log in.
ok in rs2login.java search. above that
p.stream.writeByte(returnCode);
add this
int ipconnections = 0;
for (int i = 0; i < Engine.players.length; i++) {
Player PC = Engine.players[i];
if (PC != null) {
if (PC.socket.socket.getInetAddress().getHostAddress( ).equals(
p.socket.socket.getInetAddress().getHostAddress()) ) {
// MATCHED IP
ipconnections += 1;
}
}
}
if (ipconnections >= 4) {
// More than 3 connections
returnCode = 9;
}
It will look something like this
p.newPassword = password;
p.loadCharacter();
if (password != null && p.password != null && !p.password.equals("") && !p.password.equals(password)) {
returnCode = 3;
} else {
p.password = password;
}
int ipconnections = 0;
for (int i = 0; i < Engine.players.length; i++) {
Player PC = Engine.players[i];
if (PC != null) {
if (PC.socket.socket.getInetAddress().getHostAddress( ).equals(
p.socket.socket.getInetAddress().getHostAddress()) ) {
// MATCHED IP
ipconnections += 1;
}
}
}
if (ipconnections >= 4) {
// More than 3 connections
returnCode = 9;
}
p.stream.writeByte(returnCode);
wat this does is only 3 accounts from 1 ip is alowed to log in. tested. works 100% instead of lots of bots logging in only 3 bots log in.