fix set/here and unset/here
[spider.git] / cmd / unset / here.pl
index c1c7b0f73ed4e062f9396cfaa60af2ec324b74da..4da517c111cfe252d9fde761d317cdae619026ee 100644 (file)
@@ -16,23 +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) {
-                       my $s = DXProt::pc24($ref);
-                       DXProt::eph_dup($s);
-                       DXProt::broadcast_all_ak1a($s, $DXProt::me) ;
                        $ref->here(0);
-               } elsif ($ref = Route::Node::get($call)) {
                        my $s = DXProt::pc24($ref);
                        DXProt::eph_dup($s);
                        DXProt::broadcast_all_ak1a($s, $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);