View Single Post
  #5  
Old 05-01-2009, 12:31 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by cbk1994 View Post
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.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote