if (($message=~/damn/i) or ($message=~/crap/i)) { #but with harsher language, and more cases ;) #action goes here. Kick, ban, etc... }