+ if ($dxchan) {
+ if ($dxchan->is_node) {
+ next if $clref->call eq $main::mycall; # i.e. it lives here
+ $ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ }
+ } else {
+ dbg("Route: No dxchan for $ref->{to} " . ref($clref) ) if isdbg('msg');
+ }
+ }
+ } else {
+
+ # otherwise we are dealing with a bulletin or forwarded private message
+ # compare the gotit list with
+ # the nodelist up above, if there are sites that haven't got it yet
+ # then start sending it - what happens when we get loops is anyone's
+ # guess, use (to, from, time, subject) tuple?
+ foreach $dxchan (@nodelist) {
+ my $call = $dxchan->call;
+ next unless $call;
+ next if $call eq $main::mycall;
+ next if ref $ref->{gotit} && grep $_ eq $call, @{$ref->{gotit}};
+ next unless $ref->forward_it($call); # check the forwarding file
+ next if $ref->{tonode}; # ignore it if it already being processed
+
+ # if we are here we have a node that doesn't have this message
+ if (!get_busy($call) && $dxchan->state eq 'normal') {
+ $ref->start_msg($dxchan);
+ last;
+ }