Nemesis Admin
Age : 25 Joined : 02 Mar 2008 Posts : 69
| Subject: Anty Flood Example and a CTCP protection. Wed Mar 12, 2008 9:52 pm | |
| This is a few different was to anty flood your scripts.I ll show you some that are easy an some are harder.some trigger on the event itself some trigger on multiple uses of jus the event an more specifically one that targets by nick.Nothing to serious i ll use a generic event to illustrate.
Firsti 'll show you the simple global timed var that locks the event from triggering all together so once used it wont trigger agian till it unlocks(unsets the global var).
| Code: |
on *:TEXT:!commands*:#: { ;simple text even,If !commands is said in a common channel you are in the even will trigger commands. if (%lock == on) { halt } ;If the lock is on the event will not go any further. set -u10 %lock on ;Simply sets the lock var ON an unsets it after 10 seconds once triggerd. .notice $nick Commands here blah ;Just the command line triggered effect sending the commands asked for by the event. }
|
Next is a increasing global variable example.(Any user)
| Code: | on *:TEXT:!commands*:#: { ;simple text even,If !command is said in a common channel you are in the even will trigger commands. inc -u5 %comandlock 1 if (%comandlock >= 3) { ;These last two lines together mean that if the command !commands is issued in a channel 3 or more times in 5 seconds by anyone it will ignore that persons nickname for 30 seconds. .notice $nick Please do not flood the command response ty. ;Send a notice askin them to not flood the command ignore -u30 $nick ;Ignores the flooder's nickname for 30 seconds then auto removes it
} } ;Alternately you can use the same event but use the var ON lock sa the first example shows and lock the command alltogether: on *:TEXT:!commands*:#: { if (%comandlock_2 == on) { halt } inc -u5 %comandlock 1 if (%comandlock >= 3) { set -u10 %comandlock_s on } }
|
Next is a increasing global variable example.(Specific user)
| Code: | on *:TEXT:!commands*:#: { ;simple text even,If !command is said in a common channel you are in the even will trigger commands. inc -u30 $+(%,_Command_Lock,.,$nick)) 1 if ($($+(%,_Command_Lock,.,$nick),2) == 3) { if ($($+(%,_Command_Lock,.,$nick),2) >= 4) { halt } ;The two lines above are similar to the last example but are nickname specific.Meaning that if some one triggers the command event more then 3 times in 30 seconds they are ignored BUT others may still use the command.Unlike the last example it has to be flooded by one person and NOT everyone. .notice $nick Please do not flood the command response ty. ;Send a notice askin them to not flood the command ignore -u30 $nick ;Ignores the flooder's nickname for 30 seconds then auto removes it } }
|
Well there you have it 3 simple ways to protect yourself against your own commands flooding you.
Next is a simple CTCP flood protection useing the last anty flood i just showed you.
| Code: | ctcp *:*:*: { ;Will trigger on ANY ctcp issued to you doesn't matter what ping,version,time ETC. inc -u3 $+(%,_CTCP_IGGY,.,$nick)) 1 if ($($+(%,_CTCP_IGGY,.,$nick),2) == 2) { if ($($+(%,_CTCP_IGGY,.,$nick),2) >= 3) { halt } ;Same as the 3rd example above but the time is shorter an the amount of times before it triggers is less.Thsi will only trigger if ONE person floods the command unlike the 3rd example that increases on any of the event triggered.Gives the person time to fix typos if this happens to be used in a bot for commands bein issued i personally use CTCP for my admin bot(but i use hash tables instead) commands. ignore -u120 $address($nick,2)) ;Simply ignores that flooders host so they can no long CTCP flood you.Depending on how an what your bot or script does an how the server or networks is set up you can kick/ban them for ctcp flooding } }
|
And there you have practical use of one of the anty flood examples.Protect yourselves.
Last edited by Nemesis on Fri Jul 04, 2008 2:35 am; edited 1 time in total |
|
napa182
Age : 33 Joined : 03 Mar 2008 Posts : 40
| Subject: Re: Anty Flood Example and a CTCP protection. Wed Mar 12, 2008 10:14 pm | |
| Dan thats nice of you to take the time to make that. It should help alot of n00bs to better their scripts and keep the flooding down.
GOOD WORK Dan. |
|
Nemesis Admin
Age : 25 Joined : 02 Mar 2008 Posts : 69
| Subject: Re: Anty Flood Example and a CTCP protection. Wed Mar 12, 2008 10:18 pm | |
| Yeah as much as of a fun weakness a unprotected person can be im more of a protect0r so its all good i just hope they can understand an will use it lol.  |
|
Shaimus
Joined : 12 Jul 2008 Posts : 10
| Subject: Re: Anty Flood Example and a CTCP protection. Sun Jul 13, 2008 10:34 pm | |
| | 'Tch. I'm using the first two. Probably the first one. Mostly. Thanks for making this Dan. |
|
Nemesis Admin
Age : 25 Joined : 02 Mar 2008 Posts : 69
| Subject: Re: Anty Flood Example and a CTCP protection. Sun Jul 13, 2008 11:09 pm | |
| | Hey man np everyone needs protections.`-.-´ |
|