AWC Word Censor
(AWC Versions 1.3+) (For versions 2.0+ use the filters config option)This is a simple plug in using the message hook to replace any words we don't want before the message is output to the user. You can add as many words as you want to the script.
Here's the code to stick below your AWC installation code:
- Code:
[panda=js]avacweb_chat_config.message_hook.push(function(row, username, user_id, user, msg) {
var censored = ['idiot', 'stupid', 'loser']; //add more words here
msg.innerHTML = msg.innerHTML.replace(RegExp('\\b(' + censored.join('|') + ')\\b', 'gi'), '[CENSORED]');
});
Enjoy.