X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=a6982f1f2bf53a47025e22200556f58c7ba39522;hb=26622cd57a1f5b29f9e22092cd4149c9a1e30dc6;hp=a16789c7e31a5ee94e8353be9996265e790e92c5;hpb=8942c27356acc5d5f5a20134461bcf7e6bd6a044;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index a16789c7..a6982f1f 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -234,14 +234,22 @@ sub normal my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count + # taking into account filtering and so on foreach $dxchan (@dxchan) { next if $dxchan == $self; - my $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - my $filter = Filter::it($dxchan->{spotfilter}, @spot) if $dxchan->{spotfilter}; + my $routeit; + my ($filter, $hops) = Filter::it($dxchan->{spotfilter}, @spot, $self->{call} ) if $dxchan->{spotfilter}; + if ($hops) { + $routeit = $line; + $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; + } else { + $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name + next unless $routeit; + } if ($filter) { $dxchan->send($routeit) if $routeit; } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || !$routeit; + $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; } } @@ -396,6 +404,7 @@ sub normal # queue mail DXMsg::queue_msg(0); + return; } @@ -807,7 +816,7 @@ sub broadcast_list if ($sort eq 'dx') { next unless $dxchan->{dx}; - $filter = Filter::it($dxchan->{spotfilter}, @{$fref}) if ref $fref; + ($filter) = Filter::it($dxchan->{spotfilter}, @{$fref}) if ref $fref; next unless $filter; } next if $sort eq 'ann' && !$dxchan->{ann};