Maybe a little more advance, but clear coding:
Code:
on @!*:join:#: {
  set %kick.chan $chan
  .whois $nick
}

; Set %bad.channels to:
; *#bad.channel.name *#anotherchannelname *#Hitler *#KillClowns
; the *'s are used for wildcards, can also use them for better things like #b*ad*chane*name*XDCC*someword*

raw 319:*:{
  ; $istok is alot better then a lot of "isin" operators.
  ; This will loop thru the channels in %bad.channels comparing each one with
  ; With the channels the user is in. I used $wildtok because I know on some network
  ; show user mode prefixes infront of the chan. (Eg: ~#channel, @#channel, etc.)
  ; There is probably a more efficient way of doing this. =p

  var %x = 1,%y = $gettok(%bad.channels,0,32)
  while (%x <= %y) {
    if ($wildtok($3-,$gettok(%bad.channels,%x,32),0,32) > 0) { 
      ban -u60 %kick.chan $2
      kick %kick.chan $2 Bad channel detect! (60s ban)
    }
    inc %x
  }
}


Live to Dream & Dream for Life