+ # check the message for bad words
+ my @words;
+ for (@{$ref->{lines}}) {
+ push @words, BadWords::check($_);
+ }
+ push @words, BadWords::check($ref->{subject});
+ if (@words) {
+ dbg("message with badwords '@words' $ref->{from} -> $ref->{to} '$ref->{subject}' origin: $ref->{origin} via " . $self->call) if isdbg('msg');
+ Log('msg',"message with badwords '@words' $ref->{from} -> $ref->{to} origin: $ref->{origin} via " . $self->call);
+ Log('msg',"subject: $ref->{subject}");
+ for (@{$ref->{lines}}) {
+ Log('msg', "line: $_");
+ }
+ $ref->stop_msg($fromnode);
+ return;
+ }
+