PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.badwords = {"one", "two", "three"};
}
function onPlayerChats()
{
for (temp.word: player.chat.tokenize())
{
if (temp.word in this.badwords)
{
player.chat = "bzzt";
}
}
}
... to do it using tokens of the player's chat text.