is there any way or script to prevent excess flood, when ban enforce turned on, on large channel?

specially being join/part flood. i always get problem with it
  • Code:
    on @1:ban:#: {
      var %x 1
      while ($ialchan($banmask,$chan,%x).nick) {
        kick $chan $ifmatch banned by $nick
        inc %x
      }
    } 


regards
-= Charlie =-


Charlie