I finally scripted this into Zodiac today, instead of censoring swears with just stars I wrote a function to do the whole @#$!% thing.
REPLACE (percentsign) with the actual character
PHP Code:
//#CLIENTSIDE
function getCensored(str) {
temp.symbols = "!@#$(percentsign)&";
temp.s = int(random(0, symbols.length()));
for (temp.i = 0; temp.i < str.length(); temp.i++) {
temp.newstr @= symbols.charat((temp.s + temp.i) (percent sign) symbols.length());
}
return temp.newstr;
}
Usage..
PHP Code:
//#CLIENTSIDE
// Assuming we're using Dusty's Replace Text Function
temp.str = "This sentence doesn't contain any stupid swears";
temp.swear = "stupid";
temp.str = replacetext(temp.str, temp.swear, getCensored(temp.swear));