]> dxcluster.org Git - spider.git/commitdiff
fix new swearing code.
authorminima <minima>
Sat, 7 Jan 2006 17:47:22 +0000 (17:47 +0000)
committerminima <minima>
Sat, 7 Jan 2006 17:47:22 +0000 (17:47 +0000)
perl/DXMsg.pm

index f4a1b7aba0e66dd6818d288e1e229b90d03a30b3..fe65cdb3b204667d1931113c4036f6583fcd56a8 100644 (file)
@@ -355,13 +355,12 @@ sub handle_32
                                        push @words, [$_, @bad] if @bad;
                                }
                                if (@words) {
-                                       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}");
+                                       LogDbg('msg',"$ref->{from} swore: $ref->{to} origin: $ref->{origin} via " . $dxchan->call);
+                                       LogDbg('msg',"subject: $ref->{subject}");
                                        for (@words) {
-                                               dbg("line: $_->[0] (using words: ". join(',',@{$_->[1]}).")");
-                                               Log('msg', "line: $_->[0] (using words: ". join(',',@{$_->[1]}).")");
+                                               my $r = $_;
+                                               my $line = shift @$r;
+                                               LogDbg('msg', "line: $line (using words: ". join(',', @$r).")");
                                        }
                                        $ref->stop_msg($fromnode);
                                        return;
@@ -1114,7 +1113,7 @@ sub do_send_stuff
                                        $ref->notify;
                                }
                        } else {
-                               Log('msg', $self->call . " swore to @{$loc->{to}} subject: '$loc->{subject}' in msg, REJECTED");
+                               LogDbg('msg', $self->call . " swore to @{$loc->{to}} subject: '$loc->{subject}' in msg, REJECTED");
                        }
                        
                        delete $loc->{lines};