one of the simple ways to do it is,

on *:TEXT:*:?:{
if (offensiveword1 isin $$1-) .close -m $nick
if (offensiveword2 isin $$1-) .close -m $nick
if (offensiveword3 isin $$1-) .close -m $nick
}
I haven't used mIRC in a while, so I know that's prob. not the greatest way to do it. But you can just add that to the remotes and chage the offensiveword to the words you consider offensive, and you should be set.