I might add that since you're performing a read operation everytime, this will be slow, especially with long sentences or a lot of chat. You might wanna switch to using a variable holding the bad words (small list) or a hash table (big list).