fix a load of missing things
[spider.git] / cmd / unset / here.pl
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);