X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=7f145114feb61ecd5a9f9c66af2a797b61fc6c7b;hb=6aca4e461103870de99b0ce452f21cf7fedeb54b;hp=f218d5f33e223ab0a7de0ca25422493c9c240aab;hpb=077c3e3a30c07735968cedd5d9da3ac0b51a7f42;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index f218d5f3..7f145114 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -234,11 +234,17 @@ 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 $filter = Filter::it($dxchan->{spotfilter}, @spot) if $dxchan->{spotfilter}; - my $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; + my $routeit; + my ($filter, $hops) = Filter::it($dxchan->{spotfilter}, @spot) if $dxchan->{spotfilter}; + if ($hops) { + $line =~ 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 { @@ -808,7 +814,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};