on ^*:TEXT:*word*:*:{
echo -s halted line content from $nick : $strip($1-)
haltdef
}
Note that this would halt a lot of things it shouldn't, such as 'sword'. But if you added spaces to trap only on :* word *: it won't block the first or last words, or if it's touching quotes or punctuation. Also, neither would block the word if it contained color codes in the middle. Perhaps the word you're trying to block won't be part of other words.
To block color codes inside the word, you can monitor all text, then have code inside the ON event to check for it:
on ^*:TEXT:*word*:*:{
if ( *word* !iswm $strip($1-) ) return
echo -s $event halted line content from $nick : $strip($1-)
haltdef
}
To trap someone who does: /me word
you can repeat the above routine, using :ACTION: in place of :TEXT: