radical hacks WebChat Bad Word Filter sent in the following hack:

Just thought I'd pass along a bad word filter I added.

In chat.cgi, add this code to the sub "HtmlFilter", near the end of the script. Just before "$filter;", add this code:

open(BW, "badwords.txt");
   @badwords = grep(!/^#/,<BW>);
close(BW);

foreach $badword (@badwords){
    chomp($badword);
	$filter=~ s/$badword/\#\#\#\#/ig;
}

Then, place a file called "badwords.txt" within your main chat directory; one word per line, with the longer words first.
Brad ----------------------------------------