Nice, I like it better than a mandatory filter.
However, it would be better if it cached filtered text, e.g. something like...
PHP Code:
if (this.cache.(@ pl.chat) != null && pl.chat != null) {
pl.chat = this.cache.(@ pl.chat);
} else {
// filter chat and save to cache
}
Only problem is it could potentially become a huge cache. Could help by using a single character to represent chat that doesn't need to be removed, rather than storing every single chat tidbit. I'm sure you'll think of something.
It just seems really inefficient to filter every single players chat twenty times a second.