Here is a hash table method, it is also dialog based. Meaning you open the dialog, then add a word. From there, you can choose how harsh youd like the occurance of that word to be. i.e. if someone says f__k, you can choose from "warn, kick, ban, kickban" >:D
http://www.kingtomato.com/snipplets/swearing.zip