14. Corrected Pc84/85 handling a bit.
authorminima <minima>
Wed, 26 Jul 2000 16:24:50 +0000 (16:24 +0000)
committerminima <minima>
Wed, 26 Jul 2000 16:24:50 +0000 (16:24 +0000)
made the auto for/oper optional (and not the default)

Changes
perl/DXProt.pm
perl/DXProtVars.pm

diff --git a/Changes b/Changes
index 3fd953cfb627685f5798019d9778658ec37fac2e..e9d242df3deb24f875abddb0783b6b1647e3d2e9 100644 (file)
--- a/Changes
+++ b/Changes
@@ -17,8 +17,10 @@ on DX announcements
 update the current user file.
 12. added an 'auto rcmd <node> for/oper <call>' for people I can see on the
 cluster that issue spots and for whom I have no qra info (no more than once
-a month).
+a month). This isn't the default - set $send_opernam in
+/spider/local/DXProtVars.pm (copied from /spider/perl). Good for gateways.
 13. Despace spot texts properly again for deduping purposes.
+14. Corrected Pc84/85 handling a bit.
 25Jul00=======================================================================
 1. ignore \n in ax25 mode for C client.
 2. remove extra space at the end of a DX spot announce when no grid square
index 7a2ca91036c396001b8ba557f4e08f2e2c656bb6..50765e14a54be2b5f1912d7e82619db0c1002cf0 100644 (file)
@@ -34,7 +34,7 @@ use strict;
 use vars qw($me $pc11_max_age $pc23_max_age
                        $last_hour %pings %rcmds
                        %nodehops @baddx $baddxfn 
-                       $allowzero $decode_dk0wcy);
+                       $allowzero $decode_dk0wcy $send_opernam);
 
 $me = undef;                                   # the channel id for this cluster
 $pc11_max_age = 1*3600;                        # the maximum age for an incoming 'real-time' pc11
@@ -263,7 +263,7 @@ sub normal
                                        my $node;
                                        my $to = $user->homenode;
                                        my $last = $user->lastoper || 0;
-                                       if ($main::systime > $last + $DXUser::lastoperinterval && $to && ($node = DXCluster->get_exact($to)) ) {
+                                       if ($send_opernam && $main::systime > $last + $DXUser::lastoperinterval && $to && ($node = DXCluster->get_exact($to)) ) {
                                                my $cmd = "forward/opernam $spot[4]";
                                                # send the rcmd but we aren't interested in the replies...
                                                if ($node && $node->dxchan && $node->dxchan->is_clx) {
@@ -694,6 +694,7 @@ sub normal
                        } elsif ($field[2] == 4) {
                                $user->homenode($field[3]);
                        }
+                       $user->lastoper($main::systime);   # to cut down on excessive for/opers being generated
                        $user->put;
                        last SWITCH;
                }
@@ -791,7 +792,7 @@ sub normal
                                my $ref = DXUser->get_current($field[2]);
                                my $cref = DXCluster->get($field[2]);
                                Log('rcmd', 'in', $ref->{priv}, $field[2], $field[4]);
-                               unless ($field[3] =~ /rcmd/i || !$cref || !$ref || $cref->mynode->call ne $ref->homenode) {    # not allowed to relay RCMDS!
+                               unless ($field[4] =~ /rcmd/i || !$cref || !$ref || $cref->mynode->call ne $ref->homenode) {    # not allowed to relay RCMDS!
                                        if ($ref->{priv}) {     # you have to have SOME privilege, the commands have further filtering
                                                $self->{remotecmd} = 1; # for the benefit of any command that needs to know
                                                my $oldpriv = $self->{priv};
@@ -815,7 +816,7 @@ sub normal
                                if ($ref && $ref->is_clx) {
                                        $self->route($field[1], $line);
                                } else {
-                                       route($field[1], pc34($field[2], $field[1], $field[3]));
+                                       route($field[1], pc34($field[2], $field[1], $field[4]));
                                }
                        }
                        return;
@@ -839,7 +840,7 @@ sub normal
                                if ($ref && $ref->is_clx) {
                                        $self->route($field[1], $line);
                                } else {
-                                       route($field[1], pc35($field[2], $field[1], $field[3]));
+                                       route($field[1], pc35($field[2], $field[1], $field[4]));
                                }
                        }
                        return;
index da3a68b53e9af486befd6bfeb84d0eceb35c5b49..483f954e84723cb0277d7549e152712b025d04c0 100644 (file)
@@ -50,4 +50,7 @@ $def_hopcount = 15;
 
 );
 
+# send out for/opernams for callsigns sending dx spots who haven't got qra locators
+$send_opernam = 0;
+
 1;