//System.out.println(downloads[i].getName() + " Peers: " + peers.length);
if(peers !=null){
for(int j = 0; j < peers.length; j++){
PeerManager manager = peers[j].getManager();
try {
if(manager != null){
/* //-----Data Mining-----\\
TotalPeerContainer tpc = Plugin.totalPeer_set.getTotalPeerContainer(new IP(peers[j].getIp()));
if(tpc != null){
PeerStats ps = peers[j].getStats();
tpc.setAllByPeerStats(ps);
tpc.setPercentDone((peers[j].getPercentDoneInThousandNotation()));
}*/
//--Looking for escaped seeds---\\
if(Plugin.getPluginInterface().getPluginconfig().getPluginBooleanParameter("Stuffer_Block_Seeder",false)){
if(peers[j].isSeed() || peers[j].getPercentDoneInThousandNotation() == 1000){
String color = Plugin.getPluginInterface().getPluginconfig().getPluginStringParameter("Stuffer_Block_Seeder_Color","r255g0b0");
System.out.println("Escaped Seeder: " + peers[j].getPercentDoneInThousandNotation());
if(!color.equalsIgnoreCase("null")){
String peerID = BlockIPUtils.getPeerID(peers[j].getId());
String clientName = peers[j].getClient();
// peer.setSnubbed(true);
BlockIPUtils.makeIPFilterRule(peers[j].getIp(),"Escaped Seeder: " + peerID,clientName + " Escaped Seeder",manager.getDownload().getName(), color);
Constants.SEEDER_CLIENT_BLOCKS++;
Plugin.getTab2().renumberMOD_Seeder(false, true);
}
}
}
//-----Look for Escaped peers----\\
String peerClient = peers[j].getClient();
String color = BlockIPUtils.mainRuleRun(peerClient,manager.isSuperSeeding(), manager.getDownload().getState());
if(!color.equalsIgnoreCase("null")){
String peerID = BlockIPUtils.getPeerID(peers[j].getId());
BlockIPUtils.makeIPFilterRule(peers[j].getIp(),"ESCAPED: " + peerID,peerClient,manager.getDownload().getName(), color);
}
}
} catch (DownloadException e) {
e.printStackTrace();
}