12. added an 'auto rcmd <node> for/oper <call>' for people I can see on the
authorminima <minima>
Wed, 26 Jul 2000 14:45:30 +0000 (14:45 +0000)
committerminima <minima>
Wed, 26 Jul 2000 14:45:30 +0000 (14:45 +0000)
cluster that issue spots and for whom I have no qra info (no more than once
a month).
13. Despace spot texts properly again for deduping purposes.

Changes
perl/DXProt.pm
perl/DXUser.pm
perl/DXUtil.pm

diff --git a/Changes b/Changes
index 0d7988b53b98ac847bf34c4a8198b2db57c692b0..3fd953cfb627685f5798019d9778658ec37fac2e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -15,6 +15,10 @@ on DX announcements
 10. Removed export_user.pl (no longer needed)
 11. made import_users.pl accept a non related input filename and always
 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).
+13. Despace spot texts properly again for deduping purposes.
 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 532322d0f506f6731988ddc695a68ef25d11e174..7a2ca91036c396001b8ba557f4e08f2e2c656bb6 100644 (file)
@@ -255,6 +255,26 @@ sub normal
                                                $user->put;
                                        }
                                }
+
+                               # send a remote command to a distant cluster if it is visible and there is no
+                               # qra locator and we havn't done it for a month.
+
+                               unless ($user->qra) {
+                                       my $node;
+                                       my $to = $user->homenode;
+                                       my $last = $user->lastoper || 0;
+                                       if ($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) {
+                                                       route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd));
+                                               } else {
+                                                       route(undef, $to, pc34($main::mycall, $to, $cmd));
+                                               }
+                                               $user->lastoper($main::systime);
+                                               $user->put;
+                                       }
+                               }
                        }
                                
                        # local processing 
@@ -669,7 +689,8 @@ sub normal
                                $user->lat($lat);
                                $user->long($long);
                                my $qra = $user->qra || DXBearing::lltoqra($lat, $long);
-                               $qra = DXBearing::lltoqra($lat, $long) unless DXBearing::is_qra($qra);
+                               $qra = DXBearing::lltoqra($lat, $long) unless $qra && DXBearing::is_qra($qra);
+                               $user->qra($qra) if $qra ne $user->qra;
                        } elsif ($field[2] == 4) {
                                $user->homenode($field[3]);
                        }
index 2bd140348cf1994163ace77be621310475c0c0fd..6b1db816665c46f276cb5b3662b8918cc29db299 100644 (file)
@@ -19,11 +19,12 @@ use IO::File;
 use DXDebug;
 
 use strict;
-use vars qw(%u $dbm $filename %valid);
+use vars qw(%u $dbm $filename %valid $lastoperinterval);
 
 %u = ();
 $dbm = undef;
 $filename = undef;
+$lastoperinterval = 30*24*60*60;
 
 # hash of valid elements and a simple prompt
 %valid = (
index aad4696565e1a9e8a709572b8467432b9fa7d011..9264d50501b05440e35c481e69f0e6d3c60807ef 100644 (file)
@@ -284,7 +284,8 @@ sub writefilestr
 sub unpad
 {
        my $s = shift;
-       $s =~ s/^\s+|\s+$//;
+       $s =~ s/\s+$//;
+       $s =~ s/^\s+//;
        return $s;
 }