Try each badword with an S on the end as well and also check for 'f.u c'
[spider.git] / perl / DXMsg.pm
index 5f9ebc32540579447a117eb4c8b2e0bc4654b8bf..45de0f9fa3d6a5682c52d0ee412e2805aa4df076 100644 (file)
@@ -175,7 +175,7 @@ sub process
 
                        if (exists $busy{$fromnode}) {
                                my $ref = $busy{$fromnode};
-                               my $tonode = $ref->{tonode};
+                               my $tonode = $ref->{tonode} || "unknown";
                                dbg("Busy, stopping msgno: $ref->{msgno} $fromnode->$tonode") if isdbg('msg');
                                $ref->stop_msg($self->call);
                        }
@@ -281,8 +281,8 @@ sub process
                                                        if ($ref->{subject} eq $m->{subject} && $ref->{t} == $m->{t} && $ref->{from} eq $m->{from} && $ref->{to} eq $m->{to}) {
                                                                $ref->stop_msg($self->call);
                                                                my $msgno = $m->{msgno};
-                                                               dbg("duplicate message from $ref->{from} -> $ref->{to} to $msgno") if isdbg('msg');
-                                                               Log('msg', "duplicate message from $ref->{from} -> $ref->{to} to $msgno");
+                                                               dbg("duplicate message from $ref->{from} -> $ref->{to} to msg: $msgno") if isdbg('msg');
+                                                               Log('msg', "duplicate message from $ref->{from} -> $ref->{to} to msg: $msgno");
                                                                return;
                                                        }
                                                }
@@ -389,7 +389,7 @@ sub process
                                if ($_->{from} eq $f[1] && $_->{subject} eq $f[2]) {
                                        $_->del_msg();
                                        Log('msg', "Message $_->{msgno} from $_->{from} ($_->{subject}) fully deleted");
-                                       DXProt::broadcast_ak1a($line, $self);
+                                       DXChannel::broadcast_nodes($line, $self);
                                }
                        }
                }
@@ -655,7 +655,10 @@ sub queue_msg
                                next unless $ref->forward_it($call);           # check the forwarding file
                                
                                # if we are here we have a node that doesn't have this message
-                               $ref->start_msg($dxchan) if !get_busy($call)  && $dxchan->state eq 'normal';
+                               if (!get_busy($call)  && $dxchan->state eq 'normal') {
+                                       $ref->start_msg($dxchan);
+                                       last;
+                               }
                        }
                }
 
@@ -1108,7 +1111,7 @@ sub import_msgs
                my @msg = map { chomp; $_ } <MSG>;
                close(MSG);
                unlink($fn);
-               my @out = import_one($DXProt::me, \@msg, $splitit);
+               my @out = import_one($main::me, \@msg, $splitit);
                Log('msg', @out);
        }
 }