You had had a loop doing a "isin" check to compare every line of the textfile to the current message.
Instead of a check for isin, you could check for $istok, $findtok, or $matchtok.
With token identifiers you need to specify the char that is seaparating what you're looking for. As you're trying to match whole words, which are separated by spaces, it's "32" (the ascii value of a space is 32). Sorry for my bad explanation - have a look at /help token identifiers smile

The code I was refering to:
Code:
 var %n = 1
  while ($read(expletives.txt,n,%n)) {
    if ($v1 isin $1-) {
      kick $chan $nick Your message contained badword $qt($v1)
      break
    }
    inc %n
  }

The code, modified for "istok":
Code:
 var %n = 1
  while ($read(expletives.txt,n,%n)) {
    if ($istok($1-,$v1,32)) {
      kick $chan $nick Your message contained some badword
      break
    }
    inc %n
  }
Because istok will only return "$true" or "$false", you cannot have a direct reference to the matching word.
But of course you could $read the line again to get the "bad" word that was matched by the message: "Your message contained the badword $read(expletives.txt,n,%n)"

The code, modified for "findtok":
Code:
 var %n = 1
  while ($read(expletives.txt,n,%n)) {
    if ($findtok($1-,$v1,32)) {
      kick $chan $nick Your message contained the badword $gettok($1-,$v1,32)
      break
    }
    inc %n
  }
Findtok isn't returning $true or $false but the position of the matching token. With a gettok on the original message, you return the "bad" word that was matched.