Copy this shit into your aliases. Type /mban to ban the whole channel. The script automatically discludes ChanOP and yourself from the banning and before it actually starts banning, will ask you for an 'Exception', meaning another nick not to be banned (in case you use a clone or a friend in the channel take over). If you don't want to except a nick, leave blank and hit OK.

/mban {
  //set %except $$?="Nick Exception?"  
  //set %banned 0
  //set %ban $nick(#,0)
  :ban
  inc %banned
  if ( $nick(#,%banned) = $me ) { goto next }
  elseif ( $nick(#,%banned) = ChanOP ) { goto next }
  elseif ($nick(#, %banned) = %except ) { goto next }
  else {
    //ban # $nick(#,%banned) 2 | /kick # $nick(#,%banned) banned _
  }
  :next
  if ( %banned = %ban ) { goto done }
  else { goto ban }
  :done
  //echo Mass ban in progress
}
