Yeah after posting I realized I forgot to include something.

Code
Raw 319:*: {
  var %pattern (?:[fs]uck|s[3e]x|h[^ ]*rd[^ ]*c[^ ]*ck|l[0o]v[3e]r|Pr[3e]gn[^ ]*t|b[l1i\x7C]g[^ ]*m[3e][l1i\x7C][l1i\x7C][^ ]*ns|ba[l1i\x7C][^ ]*s[^ ]p|k[^ ]*nky[^ ]*d[^ ]*sir[^ ]*|m[il1][il1]ky[^ ]*b[0o][0o]b|Pant[il1]|R[0o]l[3e]P[l1i][^ ]*Y|Er[o0]t[^ ]*c|[3e]r[3e]ct[l1i\x7C][0o]n|xxx|d[^ ]*min[^ ]*nt|[csf]uck|s[3e][k]s|$&
    $+ [lI\x7C][ae3][ae3]th[3e]r|[l1i\x7C]nj[3e]ct[l1i\x7C][0o]n|m[3ea]r[1il\x7C][3e]d|masag[3e]|s[3e]x|m[a3e]s[s][a3e]g[3e]|p[0o]rn|m[^ ]*shr[0o][0o]m|w[[1li\x7c]f[3e]|drunk|b[0o]dy[^ ]*m[^ ]*ss[^ ]*g[3e]|fr[^ ]*m[^ ]*(?:b[^ ]*h[^ ]*nd)|t[^ ]*n[^ ]*ght[^ ]*(?:w[^ ]*f[^ ]*|g[il\x7c]r[^ ]*|w[^ ]*m[^ ]*n)|d[il\x7c]ck|cucumb[3e]r|$&
    $+ my[^ ]*(?:h[0o]t|s[^ ]*x|pr[3e]gnt|s[1li\x7c]s|w[1li\x7c]f[3e]|m[0ou]m)|(h[0o]t|pr[3e]gnt|badw[0o]rd|s[1li\x7c]s|w[1li\x7c]f[3e]|m[0ou]m)[^ ]*f[ae3]nt[ae3]sy)


  if ($regex(save,$regsubex($remove($3-,~,&,@,%,+,$chr(35)),/(.)\1+/g,\1), /(?<=^| )(?|([^ ]*? $+ %pattern $+ [^ ]*)|()[^ ]+)(?=()(?: |$))/Fig)) {
    VAR %3- $3-,%bchans = $remove($regsubex($str(a $+ $chr(32),$regml(save,0)),/a/g,$iif(\n !& 1 && $regml(save,$calc(\n -1)) != $null && $gettok(%3-,$calc(\n / 2),32) != $null,$v1)),~,&,@,%,+)
    VAR %t = $comchan($2,0)
    WHILE (%t) {
      var %chanz1 = $comchan($2,%t) 
      IF ($nick(%chanz1,$me,@&~%)) {
        mode %chanz1 +b $address($2,4)  
        kick %chanz1 $2 your on a banned channel ( $+ %bchans $+ ) leave it and rejoin.
      }
      DEC %t
    }
  }
}
I tested this code quickly, it should work. maroon's comment is worth looking at if you want a clean script and not a mess.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel