XCept $Fld v1.1

By Pwntage`Ninja on Mar 30, 2007

Overview

$Fld can be used in a script to tell if $1, a nickname, is flooding you. Whenever you use $fld, it increases a hash-value that increases everytime you use $fld, until it reaches a max line limit in a specified number of seconds. Say, you had a snippet like this:

on *:TEXT:*:?: {
  If ($fld($nick) = $true) {
    .msg $nick Ignored.
    window -c $nick
    ignore $nick
  }
}

Let's say the max Time Limit, the time in which they flood you, is 3 seconds. Let's also say the max line limit, the number of times they flood you, is 5. That means the limit is 5 lines in 3 seconds. Everytime you use $fld, it increases a hash-value for flooding that nick, which is unset after the max Time Limit.

So in that script there, taking in that the Time Limit is 3secs, and that the Line Limit is 5 lines, if $nick has flooded you with 5 lines in 3 secs, it $fld($nick) will return $true. And then, as a result, it will carry out the commands inside the If statement

This snippet can be used in any script that has to respond to text, to prevent you from being disconnected from a server for "Excess Flood".

One of the other main points of this snippet, is to save someone the line-space to have to MAKE flood protection for a script. So that makes mode flooding Mode Thankers a lot harder to do with $Fld.

You can change the Time Limit and Line Limit in your Channel Popups. Right-click in any channel, go down to ' "$fld settings" Change Line Limit/Time Limit ' and click. The first question is the max number of lines, and the second question his in how many seconds. So, Question1 lines in Question2 seconds, will be the Line Limit/Time Limit.

** Notes:

  • If you don't specify a $1 param, $fld will halt itself.
  • $Fld will also halt itself if you do not have the Time Limit or the Line Limit set.

Update v1.1:

All of the above is still true, but now if you specify a $2 value, you can work on an exclusive table. The point of this is, say, if someone is flooding your away system, and you want the limit for that to be 5 lines 3 secs, and someone's flooding your query blocker, and you want the limit for THAT to be something like 7 lines 5 secs, then you won't have to use just $fld($nick) to do so. You could use $fld($nick,tablename) for a private flood protection.

This is quite MORE efficient than my v1.0.

So now you can do something like, saying that the Time Limit is 3 secs, and the Line Limit is 5 lines...

on *:TEXT:*:?: {
  If ($fld($nick,query) = $true) {
    .msg $nick Ignored.
    window -c $nick
    ignore $nick
  }
}

While at the same time having

on *:TEXT:*:?: {
  If (%PM.Blocker = on) {
    If ($fld($nick,PMBLOCKER) = $true) {
    .msg $nick Ignored.
    window -c $nick
    ignore $nick
  }
}

So that way, $fld can use $nick for two completely opposite things, since the value $nick holds changes depending on the table.

** Notes:

  • YOU CANNOT USE 'FLD' AS A TABLE NAME. As this is the default $fld table, if you don't specify $2.
  • This runs on hash tables, if you don't know what these are, you probably don't have any. So be careful in what you use for table names.
  • $1 can only be one word, as with hash tables, an item can only be one word.
  • This script does not save your hash tables when unloading/exiting mIRC. So this means you must reset your settings.
    -If you need exterior help managing your Hash Tables, in case this floods over, please go use dJabba's Hash Editor: http://www.mirc.net/projects.php?go=1096403333&thread=39322&view=39324&quote=1
    -To load, paste into your remotes section (alt + r)

Update v1.1.1
Took out all /halt's in the script, using /goto end instead.

Comments

Sign in to comment.
Pwntage`Ninja   -  Apr 02, 2007

Thanks for the suggestion, it made v1.1.1 =]

 Respond  
RusselB   -  Apr 02, 2007

Not bad. As a scripter, I prefer to see proper usage of the if/elseif/else statements, as well as $iif where appropriate.
Additionally the halt statement should be used as little as possible, and with a re-write using the statements mentioned earlier, this code could be used with no halt statements at all.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.