Quote:
Originally Posted by cbk1994
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.
|
Yes, I also thought of some nice innovative ways of remaking it, but this sample is supposed to be about as simple as possible so it will hopefully motivate people to build on top of it and make a nice filter system.
Also, usually when Graal is loading very long strings into vars it sometimes pauses the screen for up to 5-20 seconds depending on the size, which wouldn't be good.