SySt3MGaM3RFr3aKs Posted December 30, 2009 Posted December 30, 2009 Hello MxC, i would like to share Flood Protection rework, this will help you avoid some bugs, spams, lags. This is for Interlude, Gracia final already has it. The first thing you have to is to delete old Floodprotections Is so easy, look a bit: Delete floodprotector.java, after delete all the errors comes up from this delete :P. Delete Support from L2Pcinstance. Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java +++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java @@ -201,5 +201,4 @@ import net.sf.l2j.gameserver.templates.L2WeaponType; import net.sf.l2j.gameserver.util.Broadcast; -import net.sf.l2j.gameserver.util.FloodProtector; import net.sf.l2j.util.Point3D; import net.sf.l2j.util.Rnd; @@ -10883,6 +10883,5 @@ // Close the connection with the client closeNetConnection(); - // remove from flood protector - FloodProtector.getInstance().removePlayer(getObjectId()); + if (getClanId() > 0) { Then add the new FloodProtection System, look again: Take this file: FloodProtection Rework is a diff file, is the rework for FloodProtection ( is too easy to add by hand ) Then after all these, you will have to add the protection in the files you want to protect: Here is an example: Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 421) +++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 423) @@ -17,4 +17,6 @@ import java.util.logging.Level; import java.util.logging.Logger; + +import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.Config; @@ -60,4 +62,11 @@ { L2PcInstance activeChar = getClient().getActiveChar(); + + if (!activeChar.getFloodProtectors().getServerBypass().tryPerformAction("_command")) + { + activeChar.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + if (activeChar == null) NOTE: "Actionfailed.STATIC_PACKET " can be changed to new ActionFaled()); without harming the code. { Here is the link for all important: http://www.4shared.com/file/184891519/dbc74782/Protectingit.html Note: This is important for all Interlude Servers. Quote
SySt3MGaM3RFr3aKs Posted December 31, 2009 Author Posted December 31, 2009 Hidded for 200 Posts, because is unique. And Useful for all Interlude Servers. Quote
Devangell™ Posted December 31, 2009 Posted December 31, 2009 Hidded for 200 Posts, because is unique. And Useful for all Interlude Servers. yes but better edit your first post no make double post btw thanks system ;) Quote
SySt3MGaM3RFr3aKs Posted December 31, 2009 Author Posted December 31, 2009 yes but better edit your first post no make double post btw thanks system ;) Hehehehe, I know :P Thank you Quote
SySt3MGaM3RFr3aKs Posted January 15, 2010 Author Posted January 15, 2010 Updated Rework file to Pastebin. Quote
kickyou Posted February 8, 2010 Posted February 8, 2010 Link is dead, can you reupload it ? Cheers. Quote
BackNblacK® Posted February 8, 2010 Posted February 8, 2010 Link is dead, can you reupload it ? Cheers. the guy is banned from using this forum Quote
kickyou Posted February 8, 2010 Posted February 8, 2010 Auch.... Anyways i got a source from the other link, maybe someone can tell me how to add an patch.diff to eclipse? Any help will be appreciated! OK i figured it out! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.