X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fstation.pl;h=4aadd22292e7c1f2536001108263d9bf390f07b2;hb=f939c447ca5ef37073054a73e50b48a63533a9bc;hp=d3a70865911d65ddfcc2b00e6cdcc77b5ade8d0b;hpb=337f38bfac57a5e5df34c63094fb869b0e2f6bee;p=spider.git diff --git a/cmd/show/station.pl b/cmd/show/station.pl index d3a70865..4aadd222 100644 --- a/cmd/show/station.pl +++ b/cmd/show/station.pl @@ -20,8 +20,15 @@ if (@f == 0) { next if !$ref; my $lat = $ref->lat; my $long = $ref->long; + my $sort = $ref->sort || ""; + my $name = $ref->name || ""; + my $qth = $ref->qth || ""; + my $homenode = $ref->homenode || ""; + my $qra = $ref->qra || ""; my $latlong = DXBearing::lltos($lat, $long) if $lat && $long; - push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $ref->sort, $ref->name, $ref->qth, $ref->homenode, $latlong, $ref->qra; + $latlong = "" unless $latlong; + + push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $sort, $name, $qth, $homenode, $latlong, $qra; } } else { foreach $call (@f) { @@ -52,20 +59,21 @@ if (@f == 0) { $miles = $dx * 0.62133785; } - my $cref = DXCluster->get($call); + my $cref = DXCluster->get_exact($call); + $cref = DXCluster->get($call) unless $cref; my $seek = $cref->mynode->call if $cref; if ($seek) { - push @out, "User : $call (at $seek)"; + push @out, "User : $call (at $seek)"; } else { - push @out, "User : $call"; + push @out, "User : $call"; } - push @out, "Name : $name" if $name; - push @out, "Last Connect : $last" if $last; - push @out, "QTH : $qth" if $qth; - push @out, "Location : $latlong ($qra)" if $latlong || $qra ; - push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km. $from", $bearing, $miles, $dx) if $latlong; - push @out, "Home Node : $homenode" if $homenode; + push @out, "Name : $name" if $name; + push @out, "Last Connect : $last" if $last; + push @out, "QTH : $qth" if $qth; + push @out, "Location : $latlong ($qra)" if $latlong || $qra ; + push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km.", $bearing, $miles, $dx) if $latlong; + push @out, "Home Node : $homenode" if $homenode; } else { push @out, $self->msg('usernf', $call); }