]> dxcluster.org Git - spider.git/commitdiff
fix a load of missing things
authorminima <minima>
Fri, 8 Jun 2001 17:49:50 +0000 (17:49 +0000)
committerminima <minima>
Fri, 8 Jun 2001 17:49:50 +0000 (17:49 +0000)
remove the rest of the significant DXCluster references in the commands

cmd/set/here.pl
cmd/show/cluster.pl
cmd/show/node.pl
cmd/show/route.pl
cmd/show/station.pl
cmd/unset/here.pl
perl/DXMsg.pm
perl/DXProt.pm

index 114533efa87b8b011d54efc33b992c7e12e704be..e3d56f3ea30c2410b0f8e544aaa39be0d71915b1 100644 (file)
@@ -14,17 +14,25 @@ my @out;
 @args = $self->call if (!@args || $self->priv < 9);
 
 foreach $call (@args) {
-  $call = uc $call;
-  my $dxchan = DXChannel->get($call);
-  my $ref = DXCluster->get_exact($call);
-  if ($dxchan && $ref) {
-       $dxchan->here(1);
-       $ref->here(1);
-       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
-       push @out, $self->msg('heres', $call);
-  } else {
-    push @out, $self->msg('e3', "Set Here", $call);
-  }
+       $call = uc $call;
+       my $dxchan = DXChannel->get($call);
+       my $ref = Route::User::get($call);
+       if ($dxchan) {
+               $dxchan->here(1);
+               push @out, $self->msg('heres', $call);
+               if ($ref) {
+                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       $ref->here(1);
+               } elsif ($ref = Route::Node::get($call)) {
+                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       $ref->here(1);
+               } else {
+                       $ref = Route::Node::get($call);
+                       $ref->here(1) if $ref;
+               }
+       } else {
+               push @out, $self->msg('e3', "Set Here", $call);
+       }
 }
 
 return (1, @out);
index 6fe9b3560223172e33c8a06c32702d7d4d66794d..066ef7bf4c8424b1d17ad40fef1e372badf5dbe5 100644 (file)
@@ -1,4 +1,4 @@
 #
 # show some statistics
 #
-return (1, DXCluster::cluster() );
+return (1, Route::cluster() );
index d45cad36155a8e85ef49131ecb2e336cbd48bdf9..53a974ca1627f30b3e926aa913fa1076faa329af 100644 (file)
@@ -24,8 +24,8 @@ my @out;
 my $count;
 
 # search thru the user for nodes
-unless (@call) {
-       
+if ($call[0] eq 'ALL') {
+       shift @call;
        my ($action, $key, $data) = (0,0,0);
        for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
                if ($data =~ m{sort => '[ACRSX]'}) {
@@ -33,11 +33,13 @@ unless (@call) {
                        ++$count;
                }
        } 
+} elsif (@call == 0) {
+       @call = map {$_->call} DXChannel::get_all_nodes();  
 }
 
 my $call;
 foreach $call (@call) {
-       my $clref = DXCluster->get_exact($call);
+       my $clref = Route::Node::get($call);
        my $uref = DXUser->get_current($call);
        my ($sort, $ver);
        
@@ -60,7 +62,7 @@ foreach $call (@call) {
                $sort = "Spider";
                $ver = $main::version;
        } else {
-               $ver = $clref->pcversion if $clref && $clref->pcversion;
+               $ver = $clref->version if $clref && $clref->version;
        }
        
        my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;
index 95497d2d9d02c96806e332def3ff97a84b92126d..45214003ac22165ebfefc2079935b5e4ba257113 100644 (file)
@@ -14,9 +14,11 @@ return (1, $self->msg('e6')) unless @list;
 
 my $l;
 foreach $l (@list) {
-       my $ref = DXCluster->get_exact($l);
+       my $ref = Route::get($l);
        if ($ref) {
-               push @out, $self->msg('route', $l, $ref->mynode->call,  $ref->dxchan->call);
+               my $parents = join ',', $ref->parents;
+               my $dxchan = $ref->dxchan;
+               push @out, $self->msg('route', $l, $parents,  $dxchan->call);
        } else {
                push @out, $self->msg('e7', $l);
        }
index 4aadd22292e7c1f2536001108263d9bf390f07b2..b5b0f6c5a77986897fceea50a997c10dcab9483b 100644 (file)
@@ -59,9 +59,8 @@ if (@f == 0) {
                                $miles = $dx * 0.62133785;
                        }
                        
-                       my $cref = DXCluster->get_exact($call);
-                       $cref = DXCluster->get($call) unless $cref;
-                       my $seek = $cref->mynode->call if $cref;
+                       my $cref = Route::get($call);
+                       my $seek = join(',', $cref->parents) if $cref;
 
                        if ($seek) {
                                push @out, "User         : $call (at $seek)";
index 6666d4e72d493eb65f749abff61dbbbc90cce20e..63a32162b4adab4dda170eddbcc7478cb5684e42 100644 (file)
@@ -14,16 +14,25 @@ my @out;
 @args = $self->call if (!@args || $self->priv < 9);
 
 foreach $call (@args) {
-  $call = uc $call;
-  my $dxchan = DXChannel->get($call);
-  my $ref = DXCluster->get_exact($call);
-  if ($dxchan && $ref) {
-       $dxchan->here(0);
-    $ref->here(0);
-       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
-       push @out, $self->msg('hereu', $call);
-  } else {
-    push @out, $self->msg('e3', "Unset Here", $call);
-  }
+       $call = uc $call;
+       my $dxchan = DXChannel->get($call);
+       my $ref = Route::User::get($call);
+       if ($dxchan) {
+               $dxchan->here(0);
+               push @out, $self->msg('hereu', $call);
+               if ($ref) {
+                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       $ref->here(0);
+               } elsif ($ref = Route::Node::get($call)) {
+                       DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me) ;
+                       $ref->here(0);
+               } else {
+                       $ref = Route::Node::get($call);
+                       $ref->here(0) if $ref;
+               }
+       } else {
+               push @out, $self->msg('e3', "Unset Here", $call);
+       }
 }
+
 return (1, @out);
index 3063948a347a9af733100f54e8836a240c05134a..e27bf8022487cd12e2094ab3b4e6a0481a6b6e5c 100644 (file)
@@ -612,10 +612,17 @@ sub queue_msg
 #                              my $hnode =  $uref->homenode if $uref;
 #                              $clref = Route::Node::get($hnode) if $hnode;
 #                      }
-                       if ($clref && !grep { $clref->dxchan == $_ } DXCommandmode::get_all()) {
-                               next if $clref->call eq $main::mycall;  # i.e. it lives here
-                               $dxchan = $clref->dxchan;
-                               $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call)  && $dxchan->state eq 'normal';
+                       if ($clref) {
+                               my $dxc = $clref->dxchan;
+                               if ($dxc) {
+                                       if (grep {my $dxc=$clref->dxchan; $dxc && $dxc == $_ } DXCommandmode::get_all()) {
+                                               next if $clref->call eq $main::mycall;  # i.e. it lives here
+                                               $dxchan = $clref->dxchan;
+                                               $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call)  && $dxchan->state eq 'normal';
+                                       }
+                               } else {
+                                       dbg('route', "Route: No dxchan for $ref->{to} " . ref($clref) );
+                               }
                        }
                }
                
index 06cf1007c5c34eaa7f536ce2f782a5ec01fe1bed..813b89ced4f407e961e9342ebf15563cfa841b51 100644 (file)
@@ -431,11 +431,13 @@ sub normal
                                                if ($to ne $field[7]) {
                                                        $to = $field[7];
                                                        $node = Route::Node::get($to);
-                                                       $dxchan = $node->dxchan;
-                                                       if ($node->dxchan && $dxchan->is_clx) {
-                                                               route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd));
-                                                       } else {
-                                                               route(undef, $to, pc34($main::mycall, $to, $cmd));
+                                                       if ($node) {
+                                                               $dxchan = $node->dxchan;
+                                                               if ($dxchan && $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);