I know of people that wish to do this to keep drones out of channels as, on networks such as EFnet which usually allow a lot of channels to be joined, drones are often in excess of 25-30 channels. The best thing to do though is to /whois them on join and detect if the number of channels is > 25.

For example:

Code:
on @*:join:#channel:{ whois $nick }

raw 319:*:{
  set %nochannels $3-
  if ($numtok(%nochannels,32) > 25) {
    var %i = $chan(0) | while (%i) {
    if ($2 ison $chan(%i)) { kick $chan(%i) $2 Kick message here | ban $chan(%i) $2 3 } | dec %i }
    unset %nochannels
  }
}


$3- is all the channels which is then set in the variable %nochannels. $numtok then checks if the number of channels is greater than 25, and if it is, to kick ban the user. Change #channel for the channel name.

The points above do apply though, however, I would say this is much less intensive than /whois'ing every user in a channel with lots of users every X minutes.

Regards,


Mentality/Chris