fix set/here and unset/here
[spider.git] / cmd / unset / here.pl
index 63a32162b4adab4dda170eddbcc7478cb5684e42..4da517c111cfe252d9fde761d317cdae619026ee 100644 (file)
@@ -16,19 +16,16 @@ my @out;
 foreach $call (@args) {
        $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);
+               my $ref = Route::User::get($call);
+               $ref = Route::Node::get($call) unless $ref;
                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;
+                       my $s = DXProt::pc24($ref);
+                       DXProt::eph_dup($s);
+                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                }
        } else {
                push @out, $self->msg('e3', "Unset Here", $call);