$read(file,w,*text*) already performs a wildcard search. You're double evaluating with the iswm comparison...
//echo $read(help.txt, w, *help*)
Scans the file help.txt for a line matching the wildcard text *help*. The r switch implies a regex match.
Another side note: on text events do not trigger on your own text inputs (this is the on input event), thus you dont need the $me == $nick check.
Instead, I'd use:
if ($nick !isop $chan) { ...rest of code as nick is no operator... }
or if ($nick isreg $chan) { ...rest of code as nick is a regular user... }
In addition, you don't have to use 'halt' in the else part, in fact this prevents the execution of other on text events (other scripts). If you have no 'else' to do - leave it out (it's not mandatory)
Now the main problem:
You apparently want to compare badwords to the users whole line: Badword wildcard-matching line (*badword* iswm $1-), but your read condition is checking for line wildcard-matching badword: $read(file,w,*text*) works like if (*text* iswm badword). That's why it only triggers if the word is used by itself.
To get arround this:
Either loop all badwords in the file and compare it to the line ($read(file,linenumber) iswm $1-), or (much better):
Use a hash table and $hfind:
$hfind(YourHashTableWithTheBadwords,Text (that is: $1-), 1, W)
example:
hadd -m test *damn*
echo -a $hfind(test,This is a damn example!,1,W)
if ($hfind(test,Goddamn - hfind is fast...,1,W)) { echo -a text contains badword: $v1 }
(Check the mIRC help file on how to create/load/save hash tables)
Hope it helps,
Regards