I would like you to try this instead, please read the comments in it as you must select 1 or 4 methods of pharsing/comparing the line (directly below Phase1 header)
The swear.txt should be formated with complete swear words sepearated by a spaces, you do not need wildcards for this one.

Code:
on @*:TEXT:*:#: {      
  if ($nick !isop #) {     
    tokenize 32 $strip($1-)
    ;
    ; ******************************************************************************
    ; *** Phase 1 : check if any of the swear words appear in the text as words. ***
    ; ******************************************************************************
    ;
    var %nicktext = $1-                                                                          | ; *** see below for explanation (1)
    var %nicktext = $remove($1-,$chr(32))                                                        | ; *** see below for explanation (2)
    var %nicktext | !.echo -q $regsub($1-,/[^A-Z a-z]+/g,,%nicktext) | var %nicktext = %nicktext | ; *** see below for explanation (3)
    var %nicktext | !.echo -q $regsub($1-,/[^A-Za-z]+/g,,%nicktext)  | var %nicktext = %nicktext | ; *** see below for explanation (4)
    ;
    ; * Please select only one of the above four lines remark out with a ; the other three you do not want. See below for explanation.
    ;
    var %swearwords = $$read(swear.txt,nt,1)
    var %i = $numtok(%swearwords,32)
    while (%i) {
      var %badword = $gettok(%swearwords,%i,32)
      if ($+(*,%badword,*) iswm %nicktext) {
        inc -u1800 %rl. [ $+ [ $address($nick,2) ] ]
        if (%rl. [ $+ [ $address($nick,2) ] ] == 1) { msg $chan $nick badword detected - Next time is ban - %badword }
        if (%rl. [ $+ [ $address($nick,2) ] ] >= 2) { ban -ku3600 $chan $nick 2 Banned-Badword! - %badword }
        return
      }
      dec %i
    }
    ;
    ; ********************************************************************************************************************
    ; *** Phase 2 : Assume any non alpha is a character holder and search for matching words. ie "shìt typed as "sh!t" ***
    ; ********************************************************************************************************************
    ;
    var %swearwords = . $$read(swear.txt,nt,1) .
    var %nicktext | !.echo -q $regsub($1-,/[^A-Z a-z]+/g,*,%nicktext) | var %nicktext = %nicktext 
    var %i = $numtok(%nicktext,32)
    while (%i) {
      var %nickword = $gettok(%nicktext,%i,32)
      if (%nickword != *) {
        if ($(* %nickword *) iswm %swearwords) {
          inc -u1800 %rl. [ $+ [ $address($nick,2) ] ]
          if (%rl. [ $+ [ $address($nick,2) ] ] == 1) { msg $chan $nick badword detected - Next time is ban - $ [ $+ [ %i ] ] }
          if (%rl. [ $+ [ $address($nick,2) ] ] >= 2) { ban -ku3600 $chan $nick 2 Banned-Badword! - $ [ $+ [ %i ] ] }
          return
        }
        dec %i
      }
    }
  }
}
;
;
;Phase 1 %nicktext is the source text the nick says, how you wish to pharse it is your choice, see below for whats likely to occur.
;Assume "shìt" is a bad word                                ::: text  "u shìt"  "u s h i t"  "u s-h-i-t"  "thrash it"  "thrash! It"
;Option(1) : plain text                                     ::: Catch    Y           N            N/y*         N            N
;Option(2) : accumulated plain text (spaces removed)        ::: Catch    Y           Y            N/y*         Y            N
;Option(3) : alpha text (remove non alphas except space)    ::: Catch    Y           N            Y            N            N
;Option(4) : accumulated alpha text (remove all but A-Za-z) ::: Catch    Y           Y            Y            Y            Y
;
; Note on Items marked with a /y* above, While these are not acctually caught here they are caught by phase two, so may be deemed as Y
;
;
;Phase 2 removes any one or more continuous non alpha except space replacing them with one * (which represents 0 or more characters in ISWM)
;"u shìt"     -> "u shìt"
;"u s h i t"  -> "u s h i t"
;"u s-h-i-t"  -> "u s*h*i*t"
;"thrash it"  -> "thrash it"
;"thrash! It" -> "thrash* it"
;"you s%%t!"  -> "you s*t*"
;Each word is then checked for a word boundry wildmatch into the list of swearwords, with "s*h*i*t" and "s*t*" being matched
;
;


* you might notice im using ì instead of i at some points.
This is only in the documentation, because the the forum keeps changing shìt spelt with a i into [censored] <<< see smile