]> dxcluster.net Git - spider.git/commitdiff
added PC90 stuff
authorminima <minima>
Thu, 4 Jul 2002 21:59:06 +0000 (21:59 +0000)
committerminima <minima>
Thu, 4 Jul 2002 21:59:06 +0000 (21:59 +0000)
cmd/set/pc90.pl [new file with mode: 0644]
cmd/set/wwv.pl
cmd/unset/pc90.pl [new file with mode: 0644]
data/cty.dat
perl/DXProt.pm
perl/DXUser.pm
perl/Messages
perl/Route/Node.pm

diff --git a/cmd/set/pc90.pl b/cmd/set/pc90.pl
new file mode 100644 (file)
index 0000000..0aa8bea
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# set the pc90 flag
+#
+# Copyright (c) 1998 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantpc90(1);
+               $user->put;
+               push @out, $self->msg('pc90s', $call);
+       } else {
+               push @out, $self->msg('e3', "Set PC90", $call);
+       }
+}
+return (1, @out);
index 1c1ff9ccc28e507da2986ba7a9bfc2060a227134..da06ebc1cb5a132dbfad14c222c65eda3d8e9632 100644 (file)
@@ -14,14 +14,14 @@ my @out;
 @args = $self->call if (!@args || $self->priv < 9);
 
 foreach $call (@args) {
-  $call = uc $call;
-  my $chan = DXChannel->get($call);
-  if ($chan) {
-    DXChannel::wwv($chan, 1);
-    $chan->user->wantwwv(1);
-       push @out, $self->msg('wwvs', $call);
-  } else {
-    push @out, $self->msg('e3', "Set WWV", $call);
-  }
+       $call = uc $call;
+       my $chan = DXChannel->get($call);
+       if ($chan) {
+               DXChannel::wwv($chan, 1);
+               $chan->user->wantwwv(1);
+               push @out, $self->msg('wwvs', $call);
+       } else {
+               push @out, $self->msg('e3', "Set WWV", $call);
+       }
 }
 return (1, @out);
diff --git a/cmd/unset/pc90.pl b/cmd/unset/pc90.pl
new file mode 100644 (file)
index 0000000..466fc4c
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# unset the pc90 flag
+#
+# Copyright (c) 1998 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my @out;
+
+@args = $self->call if (!@args || $self->priv < 9);
+
+foreach $call (@args) {
+       $call = uc $call;
+       my $user = DXUser->get_current($call);
+       if ($user) {
+               $user->wantpc90(0);
+               push @out, $self->msg('pc90u', $call);
+       } else {
+               push @out, $self->msg('e3', "Unset PC90", $call);
+       }
+}
+return (1, @out);
index 3710a7067866cedc27a5a0563e45b94993fcfe10..985c09450d11fbd1ca288a8585d6db1ea59ec3b6 100644 (file)
@@ -273,7 +273,7 @@ St. Pierre & Miquelon:    05:  09:  NA:   46.70:    56.00:     3.0:  FP:
 Reunion:                  39:  53:  AF:  -21.10:   -55.60:    -4.0:  FR:\r
     FR,TO0R,TO3R;\r
 Glorioso:                 39:  53:  AF:  -11.50:   -47.30:    -3.0:  FR/g:\r
-    FR/G,FR5AI,FR5ZQ/G,FR5ZU/G,FR7GL;\r
+    FR/G,FR5AI,FR5ZQ/G,FR5ZU/G,FR7GL,FR5HG/G;\r
 Juan de Nova & Europa:    39:  53:  AF:  -19.60:   -41.60:    -3.0:  FR/j:\r
     E,FR4FA,J;\r
 Tromelin:                 39:  53:  AF:  -15.90:   -54.40:    -4.0:  FR/t:\r
index 59cdcf96c7272b5034007869e722e00df64ea830..fc55f42d6ef869448373e2272eaadcbce2ef553d 100644 (file)
@@ -1238,6 +1238,24 @@ sub normal
                        return;
                }
                if ($pcno == 90) {              # new style PC16,17,19,21
+                       my $node = $field[1];
+
+                       # mark this node as wanting PC90s
+                       my $parent = Route::Node::get($node);
+                       if ($parent) {
+                               my $t = hex $field[2];
+                               my $last = $parent->lastpc90 || 0;
+                               if ($last < $t) {
+                                       $parent->pc90(1);
+                                       $parent->lastpc90($t); 
+                                       my ($updsort, $n) = unpack "AA*", $field[3];
+                                       for (my $i = 4; $i < $#field; $i++) {
+                                               my ($sort, $flag, $node, $ping) = $field[$i] =~ m{(\w)(\d)([-\w+])(,\d+)?};
+                                               $ping /= 10 if (defined $ping); 
+                                       }
+                               }
+                       }
+                       
                        return;
                }
        }
@@ -1282,8 +1300,8 @@ sub process
                next if $dxchan == $main::me;
 
                # send the pc50 or PC90
-               if ($pc50s && $dxchan->is_spider) {
-#                      $dxchan->send_route(\&pc90, 1, $main::me, 'T', @dxchan);
+               if ($pc50s && $dxchan->user->wantpc90) {
+                       $dxchan->send_route(\&pc90, 1, $main::me, 'T', @dxchan);
                } else {
                        $dxchan->send($pc50s) if $pc50s;
                }
@@ -1567,7 +1585,7 @@ sub send_local_config
                # and are not themselves isolated, this to make sure that isolated nodes
         # don't appear outside of this node
                my @dxchan = grep { $_->call ne $main::mycall && $_ != $self && !$_->{isolate} } DXChannel::get_all_nodes();
-               @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan;
+               @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan && !$self->user->wantpc90;
                my @intcalls = map { $_->nodes } @localnodes if @localnodes;
                my $ref = Route::Node::get($self->{call});
                my @rnodes = $ref->nodes;
@@ -1577,6 +1595,7 @@ sub send_local_config
                unshift @localnodes, $main::routeroot;
        }
        
+
        send_route($self, \&pc19, scalar(@localnodes)+scalar(@remotenodes), @localnodes, @remotenodes);
        
        # get all the users connected on the above nodes and send them out
@@ -1587,7 +1606,7 @@ sub send_local_config
                        dbg("sent a null value") if isdbg('chanerr');
                }
        }
-#      $self->send_route(\&pc90, 1, $main::me, 'T', DXChannel::get_all());
+       $self->send_route(\&pc90, 1, $main::me, 'T', DXChannel::get_all()) if $self->user->wantpc90;
 }
 
 #
index bfc861de27271aaf7ee0c9cac912d3f41d11f24e..316b7fad2b74505a55c7f7e5a447bfdfee8e555f 100644 (file)
@@ -57,21 +57,22 @@ $lasttime = 0;
                  hmsgno => '0,Highest Msgno',
                  group => '0,Access Group,parray',     # used to create a group of users/nodes for some purpose or other
                  isolate => '9,Isolate network,yesno',
-                 wantbeep => '0,Rec Beep,yesno',
-                 wantann => '0,Rec Announce,yesno',
-                 wantwwv => '0,Rec WWV,yesno',
-                 wantwcy => '0,Rec WCY,yesno',
-                 wantecho => '0,Rec Echo,yesno',
-                 wanttalk => '0,Rec Talk,yesno',
-                 wantwx => '0,Rec WX,yesno',
-                 wantdx => '0,Rec DX Spots,yesno',
-                 wantemail => '0,Rec Msgs as Email,yesno',
+                 wantbeep => '0,Req Beep,yesno',
+                 wantann => '0,Req Announce,yesno',
+                 wantwwv => '0,Req WWV,yesno',
+                 wantwcy => '0,Req WCY,yesno',
+                 wantecho => '0,Req Echo,yesno',
+                 wanttalk => '0,Req Talk,yesno',
+                 wantwx => '0,Req WX,yesno',
+                 wantdx => '0,Req DX Spots,yesno',
+                 wantemail => '0,Req Msgs as Email,yesno',
                  pagelth => '0,Current Pagelth',
                  pingint => '9,Node Ping interval',
                  nopings => '9,Ping Obs Count',
                  wantlogininfo => '9,Login info req,yesno',
           wantgrid => '0,DX Grid Info,yesno',
                  wantann_talk => '0,Talklike Anns,yesno',
+                 wantpc90 => '1,Req PC90,yesno',
                  lastoper => '9,Last for/oper,cldatetime',
                  nothere => '0,Not Here Text',
                  registered => '9,Registered?,yesno',
index d396c54fd776c1f7a60665b00b18cb3e1fda3517..0098094a08ce364dcedb356957b54083d237d12f 100644 (file)
@@ -197,6 +197,8 @@ package DXM;
                                passerr => 'Please use: SET/PASS <password> <callsign>',
                                password => 'Password set or changed for $_[0]',
                                passwordu => 'Password removed for $_[0]',
+                               pc90s => 'PC90 enabled for $_[0]',
+                               pc90u => 'PC90 disabled $_[0]',
                                pingo => 'Ping Started to $_[0]',
                                pingi => 'Ping Returned from $_[0] $_[1] (Ave $_[2]) secs',
                                pinge1 => 'Cannot ping yourself!',
index 2a9c585dbd91c23a9fc0d27413a2fbbf57bf35c7..e7a6f8e4e1c352bbdb563d10bd05a21a59c851dd 100644 (file)
@@ -29,6 +29,8 @@ use vars qw(%list %valid @ISA $max $filterdef);
                  users => '0,Users,parray',
                  usercount => '0,User Count',
                  version => '0,Version',
+                 pc90 => '0,Using PC90,yesno',
+                 lastpc90 => '0,Last PC90 time,cldatetime',
 );
 
 $filterdef = $Route::filterdef;