From 47597a3f8635c4d4de89419c0c808ddcda59b9d5 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 3 Sep 2001 16:25:28 +0000 Subject: [PATCH] fix ann filtering strip top bits of announces --- Changes | 2 ++ perl/AnnTalk.pm | 5 +++-- perl/DXProt.pm | 6 ++---- perl/Filter.pm | 2 +- perl/Spot.pm | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index a8fca892..d6f33553 100644 --- a/Changes +++ b/Changes @@ -10,6 +10,8 @@ reduce (slightly) the dups that are dumped. 6. make set/isolate and acc/route mutually exclusive (and issue appropriate error messages). 7. Improve stat/route_node and stat/route_user for diagnostics. +8. strip top bit of comments in ann/spots. +9. fix the announce filtering problem. 01Sep01======================================================================= 1. Change build number calc (hopefully for the last time) 27Aug01======================================================================= diff --git a/perl/AnnTalk.pm b/perl/AnnTalk.pm index 77f80fe2..982e9c49 100644 --- a/perl/AnnTalk.pm +++ b/perl/AnnTalk.pm @@ -49,9 +49,10 @@ sub dup chomp $text; unpad($text); - $text =~ s/[\\\%]\d+//g; - $text =~ s/[^a-zA-Z0-9]//g; + $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth; + $text = pack("C*", map {$_ & 127} unpack("C*", $text)); + $text =~ s/[^a-zA-Z0-9]//g; my $dupkey = "A$to|\L$text"; return DXDupe::check($dupkey, $main::systime + $dupage); } diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 4b7e1d9f..51348c82 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1366,10 +1366,7 @@ sub send_announce foreach $dxchan (@dxchan) { next if $dxchan == $me; next if $dxchan == $self && $self->is_node; - my $routeit; - my ($filter, $hops); - - $dxchan->announce($line, $self->{isolate}, $to, $target, $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq) + $dxchan->announce($line, $self->{isolate}, $to, $target, $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq); } } @@ -1380,6 +1377,7 @@ sub announce my $isolate = shift; my $to = shift; my $target = shift; + my $text = shift; my ($filter, $hops); if ($self->{annfilter}) { diff --git a/perl/Filter.pm b/perl/Filter.pm index 11143825..abdcaba7 100644 --- a/perl/Filter.pm +++ b/perl/Filter.pm @@ -195,7 +195,7 @@ sub it my $key; my $type = 'Dunno'; my $asc = '?'; - + my $r = @keys > 0 ? 0 : 1; foreach $key (@keys) { $filter = $self->{$key}; diff --git a/perl/Spot.pm b/perl/Spot.pm index 69a67b9e..420025e6 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -311,9 +311,9 @@ sub dup $freq = sprintf "%.1f", $freq; # normalise frequency chomp $text; + $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = substr($text, 0, $duplth) if length $text > $duplth; unpad($text); - $text =~ s/[\\\%]\d+//g; $text = pack("C*", map {$_ & 127} unpack("C*", $text)); $text =~ s/[^a-zA-Z0-9]//g; for (0,60,120,180,240,300) { -- 2.34.1