Top

SassIRC Flood Protection Module V 1.7


mIRC Code
+ 4 likes
Please Register to submit score.
Bookmark and Share
Average Score  7.5 (of 4 scores)
Date Added  Jan 24, 2009
Last Updated  Feb 24, 2009
Tags  action  advanced  flood  flyby  join  notice  part  protect  sassirc  text 

Introduction

This is an advanced flood protection script.

Flood Types:
Quote:

Join Protections:
on join/part flood protection (# JoinsParts/In # Seconds)
on join flood protection (# Joins/In # Seconds)
on part/quit (part/quit message over # characters)

Text, Action And Notice Protections:
Well ill start off by saying this script will protect against channel and private floods,
and you can have different settings for each.
It will protect against "Mass messages (# Messages/In # Seconds)"
and "Long Messages (# Messages/Bigger Than #/In # Seconds)".


Channel Lockdown:
The channel lockdown system is made so every channel, can "lockdown" for different time periods and have different modes set on their channel for the "lockdown".( if your not too familiar with channel modes there is a "help" button which explains some channel modes briefly. )
Channel lockdown is done in 5 stages, ill show you a channel "Mass message flood" lockdown.

Quote:

[02:10] <~The_Infected> ***** Flood detected, 10 channel messages in 3 seconds. The channel has now gone into lockdown mode for a total of 5 minute(s). Triggered By Rage_Virus.
[02:11] * The_Infected sets mode: +iRSK
[02:11] * Rage_Virus was kicked by The_Infected (Flooder)
[02:13] * The_Infected sets mode: -iSK
[02:15] * The_Infected sets mode: -RC
[02:16] <~The_Infected> ***** Channel lockdown over.


These are the channels flood settings that were used in the above example, for a "Mass message flood".
Quote:

Number of messages: 10
In seconds: 3

Extra modes needed for lockdown:
Lockdown for: 5 minutes
Phaze 1: iSK
Phaze 2: RC


These are the five stages of a channel lockdown:
Quote:

1: The channel is messaged with what "type" of flood was detected, how long the channel will be in lockdown for, and the nick who triggered the "lockdown".
2: Then "Phaze 1" and "Phaze 2" modes are both set on the channel.
3: The flooder is kicked or kick/banned from the channel with the message, "Flooder"
4: After half of the channels "Lockdown time" Phaze 1 modes are unset
5: After the full lockdown time Phaze 2 modes are unset , and the channel is messaged "***** Channel lockdown over."


If you do choose to use the kick/ban option, the ban will last for a time you specify.
and as Cheiron pointed out, if you are attacked by a botnet, this could fill your ban list FAST.


i would also like to thank Cheiron for his support/suggestions with this script, it would not have gotten this far without him testing it.

Grab the Code

; SassIRC Flood Protection V 1.7
; Scripted by PuNkTuReD
 
on 1:start: {
  if (!$hget(protection)) { hmake protection 20 }
  if ($exists(protection.hsh)) { hload protection protection.hsh } 
}
on *:exit: { 
  if ($hget(protection)) { hsave -o protection protection.hsh }
}
on *:disconnect: { 
  if ($hget(protection)) { hsave -o protection protection.hsh }
}
 
menu * {
  SassIRC Flood Protection V 1.7:dialog $iif($dialog(jpf2),-v,-dm) jpf2 jpf2
}
dialog -l jpf2 {
  title "SassIRC Flood Protection V 1.7"
  option dbu
  size -1 -1 205 268
  ;
  box "Mass Join Flood", 200, 5 5 95 33
  text "Number of Joins:" , 300, 10 15 45 8
  text "In Seconds:" , 301, 10 25 40 8
  edit "" , 302, 65 14 30 10
  edit "" , 303, 65 24 30 10
  ;
  box "Join/Part Flood (Fly-Bys)", 201, 5 38 95 33
  text "Number of Join/Parts:" , 1, 10 49 60 8
  text "In Seconds:" , 2, 10 58 40 8
  edit "" , 3, 65 47 30 10
  edit "" , 4, 65 57 30 10
  ;
  box "Part/Quit Long Message Flood", 215, 5 71 95 24
  text "Message Length:" , 216, 10 82 50 8
  edit "" , 217, 65 81 30 10
  ;
  box "Long Message Flood (Channel)", 202, 5 95 95 45
  text "Number of Long Msgs:" , 5, 10 106 60 8
  edit "" , 7, 65 105 30 10
  text "In Seconds:" , 6, 10 126 40 8
  edit "" , 8, 65 125 30 10
  text "Message Length:" , 9, 10 116 50 8
  edit "" , 10, 65 115 30 10
  ;
  box "Mass Message Flood (Channel)", 203, 5 140 95 35
  text "Number of Messages:" , 11, 10 151 60 8
  edit "" , 12, 65 150 30 10
  text "In Seconds:" , 13, 10 161 40 8
  edit "" , 14, 65 160 30 10
  ;
  box "Long Message Flood (Private)", 220, 5 175 95 45
  text "Number of Long Msgs:" , 221, 10 186 60 8
  edit "" , 222, 65 185 30 10
  text "In Seconds:" , 223, 10 206 40 8
  edit "" , 224, 65 205 30 10
  text "Message Length:" , 225, 10 196 50 8
  edit "" , 226, 65 195 30 10
  ;
  box "Mass Message Flood (Private)", 230, 5 220 95 35
  text "Number of Messages:" , 231, 10 231 60 8
  edit "" , 232, 65 230 30 10
  text "In Seconds:" , 233, 10 241 40 8
  edit "" , 234, 65 240 30 10
  ;
  box "Channels list", 211, 105 5 95 114
  list 102, 110 14 85 70, autohs, hsbar, sort
  edit "", 103, 110 77 85 10, autohs
  button "--[ Add Chan ]--" , 104, 110 90 40 10
  button "--[ Del Chan ]--" , 105, 155 90 40 10
  button "", 15, 110 103 85 10
  ;
  box "Lockdown Modes", 205, 105 119 95 34
  text "Phaze 1:", 206, 110 130 25 8
  text "Phaze 2:", 207, 110 140 25 8
  edit "" , 208, 140 129 30 10
  edit "" , 209, 140 139 30 10
  button "Help", 212, 173 135 20 10
  ;
  box "Lockdown For", 204, 105 153 95 22
  edit "", 18, 145 160 20 10, autohs
  text "Minutes", 19, 170 161 20 8
  ;
  box "Immunity", 240, 105 175 95 27
  check "Ops", 241, 115 182 50 10, left
  check "HalfOps", 242, 115 190 50 10, left
  ;
  button "---[ Save Settings ]---" , 100, 105 238 95 10
  text "SassIRC Flood Protection Coded By PuNkTuReD", 210, 44 258 200 8
  ;
  box "Kick/Kick-Ban", 60, 105 202 95 30
  check "Kick", 61, 110 210 40 10
  check "Kick/Ban", 62, 110 220 40 10
  text "Ban for:", 63, 160 205 20 8
  edit "", 64, 160 213 20 10
  text "Minutes", 65, 160 223 20 8
}
on *:dialog:jpf2:*:*: {
  var %a = $dname, %b = $devent, %c = $did, %d = did -a jpf2
  if (%b == sclick) {
    if (%c == 61) { 
      if (!$did(jpf2,102).seltext) { echo -a ***** Please select a channel to set this setting for. } 
      else {
        $iif($+(%,fpkb,$did(jpf2,102).seltext),unset $+(%,fpkb,$did(jpf2,102).seltext)) 
        did -b jpf2 64  
      }
    }
    if (%c == 62) { 
      did -e jpf2 64 
      if (!$did(jpf2,102).seltext) { echo -a ***** Please select a channel to set this setting for. } 
      elseif (!$did(jpf2,64).edited) { echo -a ***** Please specify a ban length. }
      else { did -ku jpf2 61 | hadd -m protection $+(fpkb,$did(jpf2,102).seltext) on }
    }
    if (%c == 212) { dialog $iif($dialog(jpf2help),-v,-dm) jpf2help jpf2help }
    if (%c == 15) {
      if (!$did(jpf2,102).seltext) { echo -a ***** Please select a channel to protect/deprotect. } 
      else {
        $iif($($+(%,protect,$did(jpf2,102).seltext),2) == on,set $+(%,protect,$did(jpf2,102).seltext) off,set $+(%,protect,$did(jpf2,102).seltext) on) 
        $iif($($+(%,protect,$did(jpf2,102).seltext),2) == on,%d 15 --[ Protected ]--,%d 15 --[ Unprotected ]--)
      }
    }
    if (%c == 100) {
      if (!$did(jpf2,102).seltext) { echo -a ***** Please select a channel to save these protection settings for. }
      else {
        if ($did(jpf2,302).edited) { hadd -m protection $+($did(jpf2,102).seltext,noj) $did(jpf2,302) }
        if ($did(jpf2,303).edited) { hadd -m protection $+($did(jpf2,102).seltext,nojs) $did(jpf2,303) }
        if ($did(jpf2,3).edited) { hadd -m protection $+($did(jpf2,102).seltext,nopj) $did(jpf2,3) }
        if ($did(jpf2,4).edited) { hadd -m protection $+($did(jpf2,102).seltext,nopjs) $did(jpf2,4) }
        if ($did(jpf2,7).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolm) $did(jpf2,7) }
        if ($did(jpf2,8).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolms) $did(jpf2,8) }
        if ($did(jpf2,10).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolml) $did(jpf2,10) }
        if ($did(jpf2,12).edited) { hadd -m protection $+($did(jpf2,102).seltext,noam) $did(jpf2,12) }
        if ($did(jpf2,14).edited) { hadd -m protection $+($did(jpf2,102).seltext,noams) $did(jpf2,14) }
        if ($did(jpf2,18).edited) { hadd -m protection $+($did(jpf2,102).seltext,ldf) $calc($did(jpf2,18) * 60) }
        if ($did(jpf2,208).edited) { hadd -m protection $+($did(jpf2,102).seltext,ldp1) $did(jpf2,208) }
        if ($did(jpf2,209).edited) { hadd -m protection $+($did(jpf2,102).seltext,ldp2) $did(jpf2,209) }
        if ($did(jpf2,217).edited) { hadd -m protection $+($did(jpf2,102).seltext,pqlm) $did(jpf2,217) }
        if ($did(jpf2,222).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolmp) $did(jpf2,222) }
        if ($did(jpf2,226).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolmlp) $did(jpf2,226) }
        if ($did(jpf2,224).edited) { hadd -m protection $+($did(jpf2,102).seltext,nolmsp) $did(jpf2,224) }
        if ($did(jpf2,232).edited) { hadd -m protection $+($did(jpf2,102).seltext,noamp) $did(jpf2,232) }
        if ($did(jpf2,234).edited) { hadd -m protection $+($did(jpf2,102).seltext,noamsp) $did(jpf2,234) }
        if ($did(jpf2,64).edited) { hadd -m protection $+(fpkbl,$did(jpf2,102).seltext) $did(jpf2,64) }  
        echo -a ***** Flood Protection Settings Updated for $+(,$did(jpf2,102).seltext,)
      }
    }
    if (%c == 102) { 
      $iif($($+(%,protect,$did(jpf2,102).seltext),2) == on,%d 15 --[ Protected ]--,%d 15 --[ Unprotected ]--)  
      did -ra jpf2 3 $hget(protection,$+($did(jpf2,102).seltext,nopj))
      did -ra jpf2 4 $hget(protection,$+($did(jpf2,102).seltext,nopjs))
      did -ra jpf2 217 $hget(protection,$+($did(jpf2,102).seltext,pqlm))
      did -ra jpf2 302 $hget(protection,$+($did(jpf2,102).seltext,noj))
      did -ra jpf2 303 $hget(protection,$+($did(jpf2,102).seltext,nojs))
      did -ra jpf2 18 $calc($hget(protection,$+($did(jpf2,102).seltext,ldf)) / 60)
      did -ra jpf2 208 $hget(protection,$+($did(jpf2,102).seltext,ldp1))
      did -ra jpf2 209 $hget(protection,$+($did(jpf2,102).seltext,ldp2))      
      did -ra jpf2 7 $hget(protection,$+($did(jpf2,102).seltext,nolm))
      did -ra jpf2 8 $hget(protection,$+($did(jpf2,102).seltext,nolms))
      did -ra jpf2 10 $hget(protection,$+($did(jpf2,102).seltext,nolml))
      did -ra jpf2 12 $hget(protection,$+($did(jpf2,102).seltext,noam))     
      did -ra jpf2 14 $hget(protection,$+($did(jpf2,102).seltext,noams))
      did -ra jpf2 232 $hget(protection,$+($did(jpf2,102).seltext,noamp))
      did -ra jpf2 234 $hget(protection,$+($did(jpf2,102).seltext,noamsp))
      did -ra jpf2 222 $hget(protection,$+($did(jpf2,102).seltext,nolmp))
      did -ra jpf2 226 $hget(protection,$+($did(jpf2,102).seltext,nolmlp))
      did -ra jpf2 224 $hget(protection,$+($did(jpf2,102).seltext,nolmsp))
      if ($hget(protection,$+(fpkb,$did(jpf2,102).seltext)) == on) { did -e jpf2 64 | did -ku jpf2 61 | did -kc jpf2 62 }
      elseif ($hget(protection,$+(fpkb,$did(jpf2,102).seltext)) != on) { did -ku jpf2 62 | did -kc jpf2 61 | did -b jpf2 64 } 
      $iif(($hget(protection,$+(fpkb,$did(jpf2,102).seltext)) == on),did -ra jpf2 64 $hget(protection,$+(fpkbl,$did(jpf2,102).seltext)) , did -r jpf2 64)
      $iif(($hget(protection,$+($did(jpf2,102).seltext,opimmun)) == on),did -ck jpf2 241 , did -uk jpf2 241)
      $iif(($hget(protection,$+($did(jpf2,102).seltext,hopimmun)) == on),did -ck jpf2 242 , did -uk jpf2 242)
    }
    if (%c == 104) { 
      if ($did(jpf2,103).edited) { write protectchans.txt $did(jpf2,103) | did -r jpf2 103 | .timer 1 1 fillprotectchans2 } 
      else { echo -a ***** Please enter a channel to add to the list. }
    }
    if (%c == 105) { 
      if (!$did(jpf2,102).seltext) { echo -a ***** Please select a channel to remove from the list. }
      else { did -r jpf2 15 | write $+(,-ds",$did(jpf2,102).seltext,") protectchans.txt | did -d jpf2 102 $did(jpf2,102).sel | .timer 1 1 fillprotectchans2 }
    }
    if (%c == 241) { 
      $iif(($hget(protection,$+($did(jpf2,102).seltext,opimmun)) == on),opoff,opon) 
    }
    if (%c == 242) { 
      $iif(($hget(protection,$+($did(jpf2,102).seltext,hopimmun)) == on),hopoff,hopon) 
    }
  }
  if (%b == init) { fillprotectchans2 }
}
alias -l opon {  hadd -m protection $+($did(jpf2,102).seltext,opimmun) on | did -kc jpf2 241 }
alias -l opoff { hdel protection $+($did(jpf2,102).seltext,opimmun) | did -ku jpf2 241 }
alias -l hopon { hadd -m protection $+($did(jpf2,102).seltext,hopimmun) on | did -kc jpf2 242 }
alias -l hopoff { hdel protection $+($did(jpf2,102).seltext,hopimmun) | did -ku jpf2 242 }
alias -l checktextfloodchan {
  if ($len($strip($1-)) >= $hget(protection,$+($1,nolml))) { 
    $iif($($+(%,$2,bflood),2),inc $+(%,$2,bflood) 1,set -u $+ $hget(protection,$+($1,nolms)) $+(%,$2,bflood) 1)
    if ($($+(%,$2,bflood),2) == $hget(protection,$+($1,nolm))) { ignore -u180 $address($2,2) | unset $($+(%,$2,bflood),1) | chanlockdown $1 $2 Long message flood detected, $+(,$hget(protection,$+($1,nolm)),) channel messages over $+(,$hget(protection,$+($1,nolml)),) characters long in $+(,$hget(protection,$+($1,nolms)),) seconds }
  } 
  $iif($($+(%,$2,flood),2),inc $+(%,$2,flood) 1,set -u $+ $hget(protection,$+($1,noams)) $+(%,$2,flood) 1) 
  if ($($+(%,$2,flood),2) == $hget(protection,$+($1,noam))) { ignore -u180 $address($2,2) | unset $($+(%,$2,flood),1) | chanlockdown $1 $2 Flood detected, $+(,$hget(protection,$+($1,noam)),) channel messages in $+(,$hget(protection,$+($1,noams)),) seconds }
}
alias -l checktextfloodpriv {
  var %x = $comchan($2,0)
  while (%x) {
    if ($($+(%,protect,$comchan($2, %x)),2) == on) {
      if ($len($strip($1-)) >= $hget(protection,$+($1,nolmlp))) { 
        $iif($($+(%,$2,bflood),2),inc $+(%,$2,bflood) 1,set -u $+ $hget(protection,$+($1,nolmsp)) $+(%,$2,bflood) 1) 
        if ($($+(%,$2,bflood),2) >= $hget(protection,$+($1,nolmp))) { ignore -u180 $address($2,2) | unset $($+(%,$2,bflood),1) | chanlockdown $comchan($2, %x) $2 Private-Long message flood detected, $+(,$hget(protection,$+($1,nolmp)),) private messages over $+(,$hget(protection,$+($1,nolmlp)),) characters long in $+(,$hget(protection,$+($1,nolmsp)),) seconds | haltdef }
      }
      $iif($($+(%,$2,flood),2),inc $+(%,$2,flood) 1,set -u $+ $hget(protection,$+($comchan($2, %x),noamsp)) $+(%,$2,flood) 1) 
      if ($($+(%,$2,flood),2) >= $hget(protection,$+($comchan($2, %x),noamp))) { ignore -u180 $address($2,2) | unset $($+(%,$2,flood),1) | chanlockdown $comchan($2, %x) $2 Private-Flood detected, $+(,$hget(protection,$+($comchan($2, %x),noamp)),) private messages in $+(,$hget(protection,$+($comchan($2, %x),noamsp)),) seconds | haltdef } 
      dec %x 
    }
    else { dec %x }
  }
}
alias fillprotectchans2 {
  did -r jpf2 102
  var %a = $lines(protectchans.txt)
  while (%a) { did -a jpf2 102 $read(protectchans.txt, %a) | dec %a }
  did -z jpf2 102
}
dialog -l jpf2help {
  title "Lockdown Help"
  option dbu
  size -1 -1 100 100
  box "Modes Help", 1, 5 5 90 90
  list 2, 10 15 80 80 , autohs, hsbar
}
on *:dialog:jpf2help:*:*: {
  var %a = $dname, %b = $devent, %c = $did, %d = did -a jpf2help 2
  if (%b == init) { 
    did -r jpf2help 2
    %d --[ Channel Modes ]--
    %d A = Only Administrators may join
    %d c = No ANSI color can be sent to the channel
    %d C = No CTCP's allowed in the channel
    %d i = Invite required
    %d j = <joins:seconds> Throttles joins per-user to joins per seconds seconds
    %d K = /knock is not allowed
    %d k = <key> Sets a key needed to join
    %d l = <##> Sets max number of users
    %d M = A registered nickname (+r) is required to talk
    %d m = Moderated channel. Only +v/o/h users may speak
    %d N = No nick name changes permitted
    %d n = No messages from outside channels
    %d O = Only IRCops may join
    %d p = Makes channel private
    %d Q = Only U:Lined servers can kick users
    %d R = Requires a registered nickname to join
    %d S = Strips all incoming colors
    %d s = Makes channel secret
    %d t = Only chanops can set topic
    %d T = No NOTICE's allowed in the channel
    %d u = Auditorium – Makes /names and /who #channel only show channel ops
    %d V = /invite is not allowed
    %d z = Only clients on a Secure (SSL) Connection may join
    did -z jpf2help 2 
  }
}
on *:text:*:*: { 
  if ($nick isop $chan) && ($hget(protection,$+($chan,opimmun)) == on) { halt }
  if ($nick ishop $chan) && ($hget(protection,$+($chan,hopimmun)) == on) { halt }
  else {
    if ($target == $chan) {
      if ($($+(%,protect,$chan),2) == on) { checktextfloodchan $target $nick }  
    }
    if ($target == $me) { checktextfloodpriv $target $nick }  
  } 
}
on *:action:*:*: { 
  if ($nick isop $chan) && ($hget(protection,$+($chan,opimmun)) == on) { halt }
  if ($nick ishop $chan) && ($hget(protection,$+($chan,hopimmun)) == on) { halt }
  else {
    if ($target == $chan) {
      if ($($+(%,protect,$chan),2) == on) { checktextfloodchan $target $nick }  
    }
    if ($target == $me) { checktextfloodpriv $target $nick }  
  }
}
on *:notice:*:*: { 
  if ($nick isop $chan) && ($hget(protection,$+($chan,opimmun)) == on) { halt }
  if ($nick ishop $chan) && ($hget(protection,$+($chan,hopimmun)) == on) { halt }
  else {
    if ($target == $chan) {
      if ($($+(%,protect,$chan),2) == on) { checktextfloodchan $target $nick }  
    }
    if ($target == $me) { checktextfloodpriv $target $nick }  
  } 
}
alias -l chanlockdown {
  if (!$($+(%,chanlocked,$1),2)) {
    set -u $+ $hget(protection,$+($1,ldf)) $+(%,chanlocked,$1) on
    mode $1 $+($chr(43),$hget(protection,$+($1,ldp1)),$hget(protection,$+($1,ldp2)) )
    msg $1 ***** $3- $+ . The channel has now gone into lockdown mode for a total of $+(,$calc($hget(protection,$+($1,ldf)) / 60),) minute(s). Triggered By $+(,$2,,$chr(46)) 
    .timer 1 $calc($hget(protection,$+($1,ldf)) / 2) mode $1 - $+ $hget(protection,$+($1,ldp1))
    .timer 1 $hget(protection,$+($1,ldf)) mode $1 - $+ $hget(protection,$+($1,ldp2))
    .timer 1 $calc($hget(protection,$+($1,ldf)) + 1) msg $1 ***** Channel lockdown over.
    if ($2 ison $1) { 
      if ($hget(protection,$+(fpkb,$1)) == on) { ban -u $+ $calc($hget(protection,$+(fpkbl,$1)) * 60) $1 $address($2,2) Flooder | kick $1 $2 }
      else { raw -q kick $1 $2 Flooder }
    }
  }
  else { 
    if ($hget(protection,$+(fpkb,$1)) == on) { ban -u $+ $calc($hget(protection,$+(fpkbl,$1)) * 60) $1 $address($2,2) Flooder | kick $1 $2 }
    else { raw -q kick $1 $2 Flooder }  
  }
}
on 1:quit: { 
  var %a = $comchan($nick,0)
  while (%a) {
    if ($($+(%,protect,$chan($comchan($nick,%a))),2) == on) { 
      if ($($+(%,join,$chan($comchan($nick,%a)),$nick),2) > $hget(protection,$+($chan($comchan($nick,%a)),nopj))) { unset $($+(%,join,$chan($comchan($nick,%a)),$nick),1) | chanlockdown $chan($comchan($nick,%a))) $nick Join/Part flood detected, $+(,$($+(%,nopj,$chan($comchan($nick,%a)))),2),) joins/parts in $+(,$($+(%,nopjs,$chan($comchan($nick,%a)))),2),) seconds } 
      if ($len($strip($1-)) >= $hget(protection,$+($chan($comchan($nick,%a)),pqlm))) { chanlockdown $chan($comchan($nick,%a)) $nick Long Quit Message flood detected, message over $+(,$hget(protection,$+($chan($comchan($nick,%a)),pqlm),) characters long }
      dec %a
    }
    else { dec %a }
  }
}
on *:part:#: { 
  if ($($+(%,protect,$chan),2) == on) { 
    if ($($+(%,join,$chan,$nick),2) >= $hget(protection,$+($chan,nopj))) { unset $($+(%,join,$chan,$nick),1) | chanlockdown $chan $nick Join/Part flood detected, $+(,$hget(protection,$+($chan,nopj)),) joins/parts in $+(,$hget(protection,$+($chan,nopjs)),) seconds } 
    if ($len($strip($1-)) >= $hget(protection,$+($chan,pqlm))) { chanlockdown $chan $nick Long Part Message flood detected, message over $+(,$hget(protection,$+($chan,pqlm)),) characters long }
  }
}
on *:join:#: { 
  if ($($+(%,protect,$chan),2) == on) { 
    $iif($($+(%,join,$chan),2),inc $+(%,join,$chan) 1,set -u $+ $hget(protection,$+($chan,nojs)) $+(%,join,$chan) 1)
    $iif($($+(%,join,$chan,$nick),2),inc $+(%,join,$chan,$nick) 1,set -u $+ $hget(protection,$+($chan,nopjs)) $+(%,join,$chan,$nick) 1) 
    if ($($+(%,join,$chan),2) >= $hget(protection,$+($chan,noj))) { unset $($+(%,join,$chan),1) | chanlockdown $chan $nick Join flood detected, $+(,$hget(protection,$+($chan,noj)),) joins in $+(,$hget(protection,$+($chan,nojs)),) seconds }
  }
}
on 1:load: {
  echo -a ***** Thank you for loading "SassIRC Flood Protection V 1.7" Scripted by PuNkTuReD
  echo -a ***** This script will provide your network of channels with flood protection against,
  echo -a ***** Join/Part floods - (# JoinsParts/In # Seconds) - Per User
  echo -a ***** Mass join floods - (# Joins/In # Seconds) - Any User
  echo -a ***** Long Message floods channel - (# Messages/Bigger Than #/In # Seconds)
  echo -a ***** Mass Message floods channel - (# Messages/In # Seconds)
  echo -a ***** Long Message floods private - (# Messages/Bigger Than #/In # Seconds)
  echo -a ***** Mass Message floods private - (# Messages/In # Seconds)
}
on 1:unload: {
  echo -a ***** Thank you for using "SassIRC Flood Protection V 1.6" Scripted by PuNkTuReD with thanks to Cheiron
}
 

Comments

  (47)  RSS
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Jan 28, 2009 12:11 pm
ok.. having successfully worked on this with PunkTuReD over the last week to perfect it, i loaded this up onto a fresh brand new mirc v6.35 and set it all up. shunted the script in 4 channels of numbers ranging from 65 - 15 users and set it all up. lots of joins/parts etc happening all over the place, but the script kept its cool. peer resets did upset it a few times but that was to be expected as internet connections of users are not always 100% and i did get a couple of triggers but a simply edit of the number of join/parts in x seconds cured that right away. the user channel modes where found by clicking the help button and i was able to move the help box over to one side so i could still set the options on the main window. good clear explainations as to the channel modes as to what they were and what they did so that was a major bonus.
in actual operation though, i will say now, this script is HEAVY on your pc ram and processor due to what it is being asked to do. i could not get flooded off the channel or off the server for that matter lol.. we did try but the personal protection is fearsome on this script setting ignore on the user responsible on every single communication setting (pcdntk) so you are totally immune from any attack from that user. the ignore i noted was timed also which was a major bonus.

awesome script, worked really really well.. not many issues. job very well done.for me... this is a full 10/10
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Jan 28, 2009 7:06 pm
BTW

There is no "on/off" options for the floods because:
If you dont want to use one of the floods, just leave the edit box blank.

:-)
Aucun50
Comments: 548
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Jan 29, 2009 2:07 am
10/10 Great Work!
itmgt
Comments: 2
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 1:53 am
thank you for posting such a code. it looks great but the only thing i want to ask about how come it +kb. I need the script to kick and ban too, can anyone help me? I join on Dalnet servers if this may help.
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 2:53 am
well itmgt it doesnt have the option to ban, but i will be another release with the option to either

kick/ban
or
kick
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 6:33 am
PunkTuReD .. you will have a problem there with the kickban option..

chanserv ban list holds 60 names maximum *if* it has been set up generously. chanserv Akick list only holds 20 names maximum. you get a mass attack and bye bye chanserv ban list all on the single attack. and if you have a large ban list there also to begin with, it gonna cause allsorts of issues
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 12:31 pm
they will be 15 minute bans, removed automatically

ban -u900 $chan $nick | kick $chan $nick
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 12:36 pm
still gonna have an issue with a mass bot attack where you usually get a 20+ attack at once all on proxies.

IF.... IF... you were going to do this.. add it as a switched dialogue option timed ban on/off.

that way you can select/deselect its use
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 12:44 pm
yea im throwin it in as a menu option in the dialog for now,
Action to take on Flooder
Kick
Kick/Ban

i do see your point tho, but it would be a nice option to have
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 12:51 pm
under ideal situations yes

but the fundamentals behind this script is a flood attack from a botnet more than a single n00b out to be a dwee-o-maxi-noob in channel.
yes it can be added too but with extreme caution as you then start to over complicate an already complex script and then add issues to the smoothness of its running :)

the dialogue option for the on/off though is a good comprimise
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 1:43 pm
ok added the option for kick/ban
it lasts 15 minutes
and each channel can have a different setting
kick
or
kick/ban
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 2:04 pm
it took me a good while to find the option for the kick / kickban as i was expecting to find it on the actual dialogue itself. what i discovered after a while was that on the top of the dialogue is a menu marked options... if you click on that, it will show you either kick ... or kick/ban as the option. having set it i tested it with settings in place and sure to its word off it goes as said :)
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 2:06 pm
yea ill work it into the dialog, just nt sure where yet lol
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 2:21 pm
underneath the add channel section. the Protected switch there goes from protected to unprotected. you could add another mini dialogue " channel kick / channel kickban " button

that would be ideal i think
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 2:49 pm
ok for now since i was already working on it and didnt see your suggestion
so its on the main dialog
and you can set your own ban time :-)
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 3:13 pm
that looks alright actually.. only one minor over look... the time box on the kickban should only become active when that option is selected, not the kick. no point having a timed kick heh...
nice touchup should see that looking fine
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 3:23 pm
all set
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 3:30 pm
thats got it :) nice one
Bluepower10
Comments: 94
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 2, 2009 7:59 pm
Looks good. I'll try it.
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 4, 2009 4:06 am
ok.. after seveal weeks of testing this script now, it looks like we got no more issues with bugs etc :)
huge thanks for PunkTuReD for his patience and sleepless nights recoding. there is just the one word of warning still with this script...

as it is Hash table based, this will use an obscene amount of power from the processor and ram to run and may lock your mirc up (mirc not responding message) a good few times in busy channels (i found this on channels with more than 40 in them) as you use it. i would recommend no less than a gig of ram as an absolute minimum (my test lappy has 700meg and by hell did it lock) also processor... ideally dual core (my celeron d 330 on the lappy just could not cut the mustard with 70-90% usuage in heavy channels just on mirc alone)
also.. if you shut down the pc / quit mirc totally and reload, then you will have to re-enter all the values from scratch i noticed. so be warned.
the plus side is that it works extremely fast and well now and to this date i have not been flooded off the server. i took a full 2 min flood attack direct at me whilst in 4 channels (15 - 75 users in each) and had 3 extra mirc's running and i was not flooded off or lost any of the connections
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 4, 2009 5:39 am
you only have to keep inputting your setting cos you havent updated lol
Mhz
Comments: 2
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 7, 2009 5:10 am
Kick/Kick+Ban setting are not save on version 1.6
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 7, 2009 5:14 am
mine works fine.
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 4:21 am
it takes a bit of fidling to get the settings right for the kick / kickban but it does work Mhz. ideally you should be running mirc 6.35 for this script as the older ones will have issues with the coding used.
PunkTuReD and i have been toying with a beta 1.7 version atm that allows selective immunity from triggering to either halfops, ops, or both depending on the settings selected.
it has been a lot of trial and error but the beta 1.7 is looking good and runs well. no errors that i can find and i have tried lol... only issue we have atm is the radio buttons. but with a bit of fiddling this is overcome anyway with the script. the bugfix may or may not be fixable but it is not vital to the script as it will work with some patience. Maybe RusselB if he gets a look at this comment may want to have a look and a ponder over.
otherwise i think the beta 1.7 can be released and the introduction here edited just to show how to set the immunity and the way to do it.
Kirbeh_Pr0nz
Comments: 144
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 9:09 am
nice ^^;
11/10 :P
mostafa_basha
Comments: 16
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 1:42 pm
well i can rate it 200/10 its perfect
but i need help in one thing i have in my chanel Chanel Server (CS) abd i want mode to be through it like i want to replace /mode $chan +mr to be .msg CS mode #chan +mr
cause i am always idle so if i get flood it give me u r not chanel operator even i have access i bet to chanel mode i must be up @ so can u tell me how to change it
and also it will be tootaly perfect if u added clone kicker on it
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 3:05 pm
You would be better off getting project x clone detector as a seperate item for that. As for via channel issue you cannot change modes regardless unless you are Aop or higher
mostafa_basha
Comments: 16
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 4:25 pm
Cheiron i am an op in chanel but i am always idle
we have bot this bot deop any op not active for 15 minutes
so all what i need is to replace /mode #chan +mr and ban -u
to .msg cs mode #chan +mr or .msg cs ban .......
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 4:35 pm
This script is designed to be run on a bot. Either that or edit the deop feature to halt if nick is you. That is going to be your easiest option.
mostafa_basha
Comments: 16
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 4:40 pm
cherion sorry i am not that good on script
can u give me more explain
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 6:33 pm
this script here that PunkTuReD and i have been working on has been written to ideally go on a channel bot. it is not something that can be easily altered due to its complexity. as for a deop after a certain amount of time script.. all you need to do is include something like if($nick == $me) {halt} else <restofscripthere> sort of thing so that when the timer expires on your nick it halts.. but on any other op it will continue to run and deop them. but for that.. post your deop script into the forum under mirc snippet requests and ask for an edit to make it ignore you. this is not the place to be talking about that here lol..
Kirbeh_Pr0nz
Comments: 144
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 16, 2009 9:13 pm
Cheiron, can you help me with something. Im noobish at the scripting business =\
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 17, 2009 2:59 am
http://www.hawkee.com/phpBB2/viewforum.php?f=9

shunt your question there.. that is where snippet requests are asked
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 2:44 am
updated to include immunity for Op and HalfOp
Warrior1968
Comments: 7
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 4:04 am
I love this,well done to you two,I was looking for something like this! 10/10.as b otserv can be a pain to get to work.
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 4:50 am
cheers Warrior1968
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 8:12 am
ok.. loaded that update up on the desktop now that i have it back. the check buttons work and show instantly alot better than the radio buttons previously used. nice minor upgrade there PunkTuReD
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 8:42 am
cheers m8
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 24, 2009 10:08 pm
edited: i forgot to change the dialog title to 1.7
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 25, 2009 3:09 am
yeah i noticed that lol.. i did it on mine when i upgraded.
WannaKnow
Comments: 11
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 25, 2009 4:31 pm
Cheiron/Punkterd: I dont see the part where you set it +RC (Or does chanserv does this automatic?)
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 25, 2009 4:49 pm
you set the modes you want in the Phaze 1 and Phaze 2 boxes. you need both boxes to have modes in them as it works on a split timer. eg.. if you set lock down for 4 mins.. phaze1 box mode/s are unset after 2 mins and then phaze2 box unsets and clears lockdown after the 4 mins..
the help box will open a new dialogue to show you what modes are what for when you come to select them.. also DO NOT use the + symbol on the modes.. just the modes .. eg Phaze1: iKSM
Phaze2: RC
irchainscriptz
Comments: 125
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 27, 2009 8:49 pm
dam nice code Ive been looking for something like this for my new script. Excellent work 10/10
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 27, 2009 9:28 pm
ty irchainscriptz,
i do plan on redoing it.
New Design:

Main dialog:
text explaining the flood type, and a button to open a new dialog to set settings for that flood type.

more "immunity" opions.

more flood types, well it is getting into just channel protection too.

Nick Change Flood
Clones Kick/ban: youll be able to specify the number of clones

Error Checks:
Like the bug if you specify a +/- when adding to phaze1 and phaze2.
Check to see if the client using the script is actually an Op or not.

atm i cant think of any other bugs that will stop it working
if you find some let me know.

also if you have any other suggestions, just suggest and i might add it.
Cheiron
Comments: 627
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Feb 28, 2009 2:09 am
i will pm you later PunkTuReD on those updates for i have just what you need
StitchRokcs
Comments: 1
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Jul 16, 2009 11:14 pm
If I have the bot set mode +m on a channel for a lockdown shouldnt it -m when the lockdown is over?
PunkTuReD
Comments: 461
 
mIRC Snippet:  SassIRC Flood Protection Module V 1.7
Posted on Jul 19, 2009 9:37 am
yes it should.

what server are you on?

shw me if you can,
your flood settings and modes you set.

an example from the channel would be good.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom