I don't get what is meant by "kicked detected". I also don't know whether you want to count (and react on) joins into a specific channel only.
However, here's a sketch to detect massjoins "in general" (not channel specific). It may give you a general idea - modify the code as you like... or explain what you're looking for smile
Code:
; someone (but not you) joins
on !*:join:#: {

  ; the user has no other comchan (to prevent you from counting users more than once that are "reconnecting-and-auto-rejoining")
  if ($comchan($nick,0) == 1) {

    ; add to hash table called "joinflood.<network connection id>" an item called "joining.<random number>" and unset the item after 10 seconds
    hadd -mu10 $+(joinflood.,$cid) $+(joining.,$rand(0,99999))

    ; if more than 9 items are set in the network's joinflood hash table
    ; (that is: more than 9 different users joined any chan of yours in the last 10 seconds)
    if ($hfind($+(joinflood.,$cid),joining.*,0,w) >= 9) {

      ; ##### do stuff #####
      ; e.g. set some mode in some chans and start a timer to unset the modes after a fixed time
      ; or have the timer call an alias that will periodically check the number of recent joins and unsets the modes if all eased up)

    }
  }
}

Last edited by Horstl; 17/05/11 03:02 AM.