Welcome to the wonderful world of whack-a-mole. Where people get more creative in avoiding badword filters, and you end up banning someone who uses the word 'class' because it contains a bad word. And then your list of bad words grows and grows.

if you want to match using only the word:

if ($1- == nintendo)

to match using the word as a discrete word:

if ($istok($1-,nintendo,32))

to match the string appearing anywhere in the message:

if (nintendo isin $1-)