ok sorry abot xferers because this is makeing it beable to be only1 connection not sure if u want to add
Step 1: Make a new file and save it as :
SYIBlocker.java
Code:
import java.util.ArrayList;
public class SYIBlocker{
public final static void start(){
addCrasher("SYIpkpker");}
public final static void addCrasher(String Name){
Names.add(Name.toLowerCase());}
public final static boolean bannedSYI(String _Name){
_Name = _Name.toLowerCase();
for(String Name : Names)
if(_Name.contains(Name))
return true;
for(Character c : _Name.toCharArray())
if(!Character.isLetterOrDigit(c))
if(Character.isSpaceChar(c))
if(!Character.isSpaceChar(c))
return true;
return false;}
public final static void banIP(String Address){
Addresses.add(Address.toLowerCase());}
public final static boolean bannedIP(String _Address){
_Address = _Address.toLowerCase();
for(String Address : Addresses)
if(Address.equals(_Address))
return true;
return false;}
public static ArrayList<String> Names = new ArrayList<String>();
public static ArrayList<String> Addresses = new ArrayList<String>();}
Save it and close your browser/documents or w/e
Step 2:
Go to server.java and search for
Code:
long lastTicks = System.currentTimeMillis();
You will see this what i have posted below:
Code:
int waitFails = 0;
long lastTicks = System.currentTimeMillis();
long totalTimeSpentProcessing = 0;
int cycle = 0;
Add this in for blocker:
Code:
SYIBlocker.start();
Add this (ull need)
Code:
int cycle = 0;
Next search for these (under)
Code:
void run
And in there find
Code:
(Found < 3
Under that add
Code:
if(!SYIBlocker.bannedIP(connectingHost)) {
Also you might wanna add a
Code:
}
Last step:
Go to client.java
Search for this to find:
Code:
if(playerName == null || playerName.length() == 0)
You will see something like this or what not:
Code:
if(playerName == null || playerName.length() == 0)
disconnected = true;
Under those add these:
Code:
disconnected = true;
Add these:
Code:
if(SYIBlocker.bannedSYI(playerName))
{
SYIBlocker.banIP(connectedFrom);
disconnected = true;
this.destruct();
return;
}Save and compile
credits to me
and slipknot scape source i found it out in there i edited a few things