Jethro commented on a Page, !say with badwords  -  Dec 04, 2009

Your existing script will respond to everything even if a user doesn't say a bad word. My suggestion to you is this:

on *:TEXT:*:#: {
  if ($strip($1) == !say) {
    var %b = /((fu|di)ck|word1|word2|word3|word4|word5|word6|word7|word8|word9|word10|word11)/iS
    $iif(!$regex($2-,%b),msg # $nick says: $2-,msg $nick Your message contained $+(",$regml(1),") and was ignored.)
  }
}

As shown, you can add more bad words to be covered by replaceing word1, word2, etc...

P.S. I forgot to add that the idea of your script isn't foolproof, meaning upon entering the command !say BadwordHere, it'll not be censored or filtered, rather than sending a PM to the offender for a warning.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.