napa182 commented on a Page, Silence on Flood  -  Aug 31, 2008

you can use it this way so you can turn it on in channels you want it to run in

on @*:TEXT:*:#:{
  if ($nick(#,$nick,r) && $istok(%sflood,$chan,44))  {
    inc -u5 $+(%,flood.,$nick)
    if ($($+(%,flood.,$nick),2) = 8) {
      mode $chan +b ~q: $+ $address($nick,2)
      msg $chan $nick You have been silenced for two minutes. Please don't flood.
      msg #staff $nick has been silenced in $chan for flooding.
      $+(.,timersilenced,.,$nick) 1 120 mode $chan -b ~q: $+ $address($nick,2)
    }
  }
}
menu channel {
  .Silence on Flood
  .. $iif($istok(%sflood,$chan,44),Turn Off in Room # ,Turn On in Room # ):{ set %sflood $iif(!$istok(%sflood,$chan,44),$addtok(%sflood,$chan,44),$remtok(%sflood,$chan,1,44)) | echo -a $iif($istok(%sflood,$chan,44),Silence on Flood is now On in room # .,Silence on Flood is now Off in room # .) } 
}

Doodle said:

whats the proper 'if' if they're voiced?
um you can do it like this

 if ($nick isvoice #) or you can do it like this if ($nick(#,$nick,v) or you can add both voiced and reg users to it like this
if ($nick(#,$nick,vr)
 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.