My First flood protection

By Cobra_Strike on Nov 13, 2006

This is my first flood protection script

!floodon to turn on !floodoff to turn off

When !floodon is triggered it will set the channel and only work in the channels it is activated in

Can only be turned on and off by half op or higher

hope you enjoy XD

on *:text:!floodon:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    if (%floodchan) {
      notice $nick flood protection is already on for $chan 
    }
    else {
      set %floodchan $addtok(%floodchan,$chan,44) 
      msg $chan 4Flood protection is now on for $chan 
    } 
  }
}
on *:text:!floodoff:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    if (%floodchan) {
      set %floodchan $remtok(%floodchan,$chan,1,44) 
      msg $chan 4Flood protection is now off for $chan 
    } 
    else {
      notice $nick Flood protection is already turned off for $chan
    } 
  }
}
on *:text:*:%floodchan: { 
  if $nick !isop $chan { 
    hadd -mu10 chanflood $+($nick,.,$chan,.,$ticks) 1 
    if ($hfind(chanflood,$+($nick,.*),0,w) > 6) { 
      ban $+(-,ku,$calc(60)) $chan $nick $nick Dont Flood $chan !!! (1 Minute Ban) 
    } 
  } 
}

Comments

Sign in to comment.
Cobra_Strike   -  Nov 29, 2006

Well gourob I thought the tital My First flood protection might be a bit of a give away as to what this script does
But just incase Yes its text flood protection

Anyway
There was a problem with the remtok but i have fixed it now so the script works properly

 Respond  
gourob   -  Nov 27, 2006

well what exactly this addon does ? works against text flood just ? give us some details pls.

 Respond  
Naemuti   -  Nov 26, 2006

\"$calc(1*60))\"

C\'mon...not EVERYONE takes SUCH difficult math in their Freshman year, can\'t you just say 60?

 Respond  
Invalid   -  Nov 24, 2006

Nice, I like it, very simple and easy...

 Respond  
Cobra_Strike   -  Nov 17, 2006

It does work for more than one channel its set to add the channels each to the %var independantly and remove each in the same way

Thats what the
set %floodchan $addtok(%floodchan,$chan,44)
and
set %floodchan $remtok(%floodchan,$chan,44)
is for to add and remove new channels to the variable

so it will work in the channel\'s it has been activated and wont do anything in the ones its not activated in
so yeah it does work in different channels at once
not just one as you put it lol

 Respond  
larry   -  Nov 17, 2006

a nice anti flood script. Only you could try to make it for more channels than just one like mine

 Respond  
Cobra_Strike   -  Nov 17, 2006

=p I\'m suprised that no one has had any comments on this yet XD

 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.