// Written by NoFiX.
function onClientMessage_badWordsFilter(%cl, %msg, %type)
  after onClientMessage
{
  if($Pref::filterBadWords) {
     %idx = -1;
    while((%w = getWord($badWords, %idx++)) != -1)
    {
      if(0 <= String::findSubStr(%msg, %w))
      {
         echo("onClientMessage Filtering: " @ %w);
         %ret = false;
         return;
     }
    }
 }
}
