To take it a step further, here you go...

Code:
; mode changes

; Usage: /massmode <chan> <mode>
; Example: /massmode #mychannel +o
/massmode {
  var %chan = $$1, %nick = 1, %nicks
  while ($nick(%chan, %nick)) {
    var %nicks = $addtok(%nicks, $ifmatch, 32)
    if ($numtok(%nicks, 32) == $modespl) || (%nick == $nick(%chan, 0)) {
      /mode %chan $+($left($$2, 1),$str($right($$2, 1),$modespl)) %nicks
      /unset %nicks
    }
    /inc %nick
  }
}


Personally, if you dont like the idea of a take over (in all the seriousness you bing to it), try setting chanserv protections. ChanServ can limit modes like +b, where noone can eb banned. Also, you have user levels, use them. Set those who regular ur channel to protected. If your netowrk doesnt have services, write a script..

Code:
on !@*:BAN:#: {
  /inc -u3 % [ $+ [ $chan ] $+ ] . [ $+ [ $nick ] ]
  if (% [ $+ [ $chan ] $+ ] . [ $+ [ $nick ] ] > 4) /kick $chan $nick Takeover Detected
}

on !@*:KICK:#: {
  /inc -u3 % [ $+ [ $chan ] $+ ] . [ $+ [ $nick ] ]
  if (% [ $+ [ $chan ] $+ ] . [ $+ [ $nick ] ] > 4) /kick $chan $nick Takeover Detected
}


There, that allows only 4 mode changes per three seconds (including kicks). If they do more, they get the golden boot award... It simple people


-KingTomato