no text line msgs should now propagate
authorminima <minima>
Tue, 24 Oct 2000 17:40:37 +0000 (17:40 +0000)
committerminima <minima>
Tue, 24 Oct 2000 17:40:37 +0000 (17:40 +0000)
add dxcc, itu and cq to ann filters
add default filters for user and nodes

Changes
filter/ann/GB7MBC.pl.issue
perl/DXChannel.pm
perl/DXCommandmode.pm
perl/DXMsg.pm
perl/DXProt.pm
perl/Prefix.pm

diff --git a/Changes b/Changes
index 55665b06008690edb0005b40ef0e7e622a7b3c81..1b2fd6dafe9d4ed62dc69d961abd0ae913c9614c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,11 @@
 24Oct00=======================================================================
 1. added cty.dat from http://www.k1ea.com/cty/index.htm to the prefix_data.pl
 data file and modified create_prefix.pl accordingly.
+2. the 'no text line' messages should now propagate correctly
+3. added the dxcc, itu and cq zone numbers for announcer and origining node 
+on announce filters - see the /spider/filter/ann/*.issue files for more info.
+4. you can now specify a 'user_default.pl', 'node_default.pl' and 
+'in_node_default.pl' in each of the filter directories
 23Oct00=======================================================================
 1. Added K5K as Kingman Reef
 1. Added K7K as Kure
index 5d37fb63d616ef6869f7927f9e07eb9354317460..fb81021ffdb03872e5f33f93cb9d5a2d48f36bdd 100644 (file)
@@ -9,6 +9,12 @@
 # 4 - origin
 # 5 - 0 - announce, 1 - wx
 # 6 - channel callsign (the interface from which this spot came)
+# 7 - announcer country no (as from sh/prefix)
+# 8 - announcer itu no
+# 9 - announcer cq zone
+# 10 - origin country no (as from sh/prefix)
+# 11 - origin itu no
+# 12 - origin cq zone
 
 $in = [
         [ 1, 0, 'a', '^(P[ABCDE]|G|M|2|EI|F|ON|LX|HB9)' ],
index d975ca0d93d052bb0ba6c8cc4f07d26eb91f55f6..9d52d67c3a204481a220e2feac51a833efd4357b 100644 (file)
@@ -133,12 +133,6 @@ sub alloc
        $self->{lang} = $main::lang if !$self->{lang};
        $self->{func} = "";
 
-       # get the filters
-       $self->{spotfilter} = Filter::read_in('spots', $call, 0);
-       $self->{wwvfilter} = Filter::read_in('wwv', $call, 0);
-       $self->{wcyfilter} = Filter::read_in('wcy', $call, 0);
-       $self->{annfilter} = Filter::read_in('ann', $call, 0);
-
        bless $self, $pkg; 
        return $channels{$call} = $self;
 }
index e7cf7e972c94a4ac5a401366565035c65460629f..b0d23af25008417324e823732d3efe7b0c5f08a7 100644 (file)
@@ -81,6 +81,12 @@ sub start
        $self->{logininfo} = $user->wantlogininfo;
        $self->{here} = 1;
 
+       # get the filters
+       $self->{spotfilter} = Filter::read_in('spots', $call, 0) || Filter::read_in('spots', 'user_default', 0);
+       $self->{wwvfilter} = Filter::read_in('wwv', $call, 0) || Filter::read_in('wwv', 'user_default', 0);
+       $self->{wcyfilter} = Filter::read_in('wcy', $call, 0) || Filter::read_in('wcy', 'user_default', 0);
+       $self->{annfilter} = Filter::read_in('ann', $call, 0) || Filter::read_in('ann', 'user_default', 0) ;
+
        # clean up qra locators
        my $qra = $user->qra;
        $qra = undef if ($qra && !DXBearing::is_qra($qra));
index f9ede90c4c167f9445019e243dc346d7bd565cfc..55834fc3a6edf0a408c6091df4fe7e0caffcef0e 100644 (file)
@@ -110,6 +110,7 @@ sub alloc
        $self->{rrreq} = shift;
        $self->{gotit} = [];
        $self->{lastt} = $main::systime;
+       $self->{lines} = [];
     
        return $self;
 }
@@ -122,7 +123,6 @@ sub workclean
        delete $ref->{tonode};
        delete $ref->{fromnode};
        delete $ref->{stream};
-       delete $ref->{lines};
        delete $ref->{file};
        delete $ref->{count};
        delete $ref->{lastt} if exists $ref->{lastt};
@@ -238,7 +238,6 @@ sub process
                                $work{"$f[2]$f[3]"} = $ref;     # new ref
                                dbg('msg', "incoming subject ack stream $f[3]\n");
                                $busy{$f[2]} = $ref; # interlock
-                               $ref->{lines} = [];
                                push @{$ref->{lines}}, ($ref->read_msg_body);
                                $ref->send_tranche($self);
                                $ref->{lastt} = $main::systime;
@@ -408,12 +407,7 @@ sub store
 {
        my $ref = shift;
        my $lines = shift;
-       
-       # we only proceed if there are actually any lines in the file
-#      if (!$lines || @{$lines} == 0) {
-#              return;
-#      }
-       
+
        if ($ref->{file}) {                     # a file
                dbg('msg', "To be stored in $ref->{to}\n");
                
index 1f2a642809e31b97637b3ea5b24e22fe74dcfd86..5d2b10b8e38543bce9d20964f09f769152e18aca 100644 (file)
@@ -211,11 +211,18 @@ sub start
        $self->{consort} = $line;       # save the connection type
        $self->{here} = 1;
 
+       # get the output filters
+       $self->{spotfilter} = Filter::read_in('spots', $call, 0) || Filter::read_in('spots', 'node_default', 0);
+       $self->{wwvfilter} = Filter::read_in('wwv', $call, 0) || Filter::read_in('wwv', 'node_default', 0);
+       $self->{wcyfilter} = Filter::read_in('wcy', $call, 0) || Filter::read_in('wcy', 'node_default', 0);
+       $self->{annfilter} = Filter::read_in('ann', $call, 0) || Filter::read_in('ann', 'node_default', 0) ;
+
+
        # get the INPUT filters (these only pertain to Clusters)
-       $self->{inspotfilter} = Filter::read_in('spots', $call, 1);
-       $self->{inwwvfilter} = Filter::read_in('wwv', $call, 1);
-       $self->{inwcyfilter} = Filter::read_in('wcy', $call, 1);
-       $self->{inannfilter} = Filter::read_in('ann', $call, 1);
+       $self->{inspotfilter} = Filter::read_in('spots', $call, 1) || Filter::read_in('spots', 'node_default', 1);
+       $self->{inwwvfilter} = Filter::read_in('wwv', $call, 1) || Filter::read_in('wwv', 'node_default', 1);
+       $self->{inwcyfilter} = Filter::read_in('wcy', $call, 1) || Filter::read_in('wcy', 'node_default', 1);
+       $self->{inannfilter} = Filter::read_in('ann', $call, 1) || Filter::read_in('ann', 'node_default', 1);
        
        # set unbuffered and no echo
        $self->send_now('B',"0");
@@ -446,7 +453,21 @@ sub normal
                                
                                # global ann filtering on INPUT
                                if ($self->{inannfilter}) {
-                                       my ($filter, $hops) = Filter::it($self->{inannfilter}, @field[1..6], $self->{call} );
+                                       my ($ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq) = (0..0);
+                                       my @dxcc = Prefix::extract($field[1]);
+                                       if (@dxcc > 0) {
+                                               $ann_dxcc = $dxcc[1]->dxcc;
+                                               $ann_itu = $dxcc[1]->itu;
+                                               $ann_cq = $dxcc[1]->cq();                                               
+                                       }
+                                       @dxcc = Prefix::extract($field[5]);
+                                       if (@dxcc > 0) {
+                                               $org_dxcc = $dxcc[1]->dxcc;
+                                               $org_itu = $dxcc[1]->itu;
+                                               $org_cq = $dxcc[1]->cq();                                               
+                                       }
+                                       my ($filter, $hops) = Filter::it($self->{inannfilter}, @field[1..6], $self->{call}, 
+                                                                                                       $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq);
                                        unless ($filter) {
                                                dbg('chan', "Rejected by filter");
                                                return;
@@ -1269,7 +1290,20 @@ sub send_announce
                my ($filter, $hops);
 
                if ($dxchan->{annfilter}) {
-                       ($filter, $hops) = Filter::it($dxchan->{annfilter}, @_, $self->{call} );
+                       my ($ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq) = (0..0);
+                       my @dxcc = Prefix::extract($_[1]);
+                       if (@dxcc > 0) {
+                               $ann_dxcc = $dxcc[1]->dxcc;
+                               $ann_itu = $dxcc[1]->itu;
+                               $ann_cq = $dxcc[1]->cq;                                         
+                       }
+                       @dxcc = Prefix::extract($_[5]);
+                       if (@dxcc > 0) {
+                               $org_dxcc = $dxcc[1]->dxcc;
+                               $org_itu = $dxcc[1]->itu;
+                               $org_cq = $dxcc[1]->cq;                                         
+                       }
+                       ($filter, $hops) = Filter::it($dxchan->{annfilter}, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq);
                        next unless $filter;
                } 
                if ($dxchan->is_node && $_[1] ne $main::mycall) {  # i.e not specifically routed to me
index 2906e726260eaea079a3542e16be20335aa5a5ff..34f581d0e79d224db018d01557fca1a1bf373156 100644 (file)
@@ -188,6 +188,7 @@ my %valid = (
                         itu => '0,ITU',
                         cq => '0,CQ',
                         utcoff => '0,UTC offset',
+                        cont => '0,Continent',
                        );
 
 no strict;