X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2FDXMsg.pm;h=f4a1b7aba0e66dd6818d288e1e229b90d03a30b3;hb=363580155c0ea3605530752cb98aca43f2736938;hp=67165ef455a03df1fcae0368bd1ba21504f5c325;hpb=e4366c330ee2e359f1a2404f9ff35075e81165cc;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 67165ef4..f4a1b7ab 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -346,17 +346,22 @@ sub handle_32 } # check the message for bad words + my @bad; my @words; + @bad = BadWords::check($ref->{subject}); + push @words, [$ref->{subject}, @bad] if @bad; for (@{$ref->{lines}}) { - push @words, BadWords::check($_); + @bad = BadWords::check($_); + push @words, [$_, @bad] if @bad; } - push @words, BadWords::check($ref->{subject}); if (@words) { - dbg("$ref->{from} swore: '@words' -> $ref->{to} '$ref->{subject}' origin: $ref->{origin} via " . $dxchan->call) if isdbg('msg'); - Log('msg',"$ref->{from} swore: '@words' -> $ref->{to} origin: $ref->{origin} via " . $dxchan->call); + dbg("$ref->{from} swore: $ref->{to} '$ref->{subject}' origin: $ref->{origin} via " . $dxchan->call) if isdbg('msg'); + Log('msg',"$ref->{from} swore: $ref->{to} origin: $ref->{origin} via " . $dxchan->call); + dbg("subject: $ref->{subject}"); Log('msg',"subject: $ref->{subject}"); - for (@{$ref->{lines}}) { - Log('msg', "line: $_"); + for (@words) { + dbg("line: $_->[0] (using words: ". join(',',@{$_->[1]}).")"); + Log('msg', "line: $_->[0] (using words: ". join(',',@{$_->[1]}).")"); } $ref->stop_msg($fromnode); return; @@ -479,7 +484,7 @@ sub notify my $ref = shift; my $to = $ref->{to}; my $uref = DXUser->get_current($to); - my $dxchan = DXChannel->get($to); + my $dxchan = DXChannel::get($to); if (((*Net::SMTP && $email_server) || $email_prog) && $uref && $uref->wantemail) { my $email = $uref->email; if ($email) {