fix ann filtering
authorminima <minima>
Mon, 3 Sep 2001 16:25:28 +0000 (16:25 +0000)
committerminima <minima>
Mon, 3 Sep 2001 16:25:28 +0000 (16:25 +0000)
strip top bits of announces

Changes
perl/AnnTalk.pm
perl/DXProt.pm
perl/Filter.pm
perl/Spot.pm

diff --git a/Changes b/Changes
index a8fca892711eead92fff5471e844cd8800d0d2c5..d6f33553ece2ed7a3e1b668ecea578152732da8b 100644 (file)
--- 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=======================================================================
index 77f80fe29bc8c2308495d7405455f294efbdd55b..982e9c49afc9eb99b679ac180ecbdab8a48af0a4 100644 (file)
@@ -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);
 }
index 4b7e1d9f3cafffd3e6e53680dc5fcd3c8f7cb0e3..51348c82c0cb6e94e282fe922a46284db377cbb3 100644 (file)
@@ -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}) {
index 11143825710de95d30a2f649a6449986fb34193d..abdcaba7363d8dbb2c8e682ed52a23cf644bfbeb 100644 (file)
@@ -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};
index 69a67b9e885668e6ec135db586d3e4085b9ec52f..420025e6ed8f0d1445f5fd8ec5cfc85e1ce9a275 100644 (file)
@@ -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) {