2 # show the station details
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
6 # Modifications by Iain Philipps G0RDI, 07-Dec-1998
9 my ($self, $line) = @_;
10 my @f = split /\s+/, uc $line;
14 push @f, $self->call unless @f;
16 if (@f <= 2 && uc $f[0] eq 'ALL') {
17 return (1, $self->msg('e6')) if ($self->priv < 6);
19 my $exp = shellregex(uc shift @f) if @f;
22 @calls = grep {m{$exp}} DXUser::get_all_calls();
24 @calls = DXUser::get_all_calls();
27 foreach $call (@calls) {
28 my $ref = DXUser->get_current($call);
31 my $long = $ref->long;
32 my $sort = $ref->sort || "";
33 my $name = $ref->name || "";
34 my $qth = $ref->qth || "";
35 my $homenode = $ref->homenode || "";
36 my $qra = $ref->qra || "";
37 my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
38 $latlong = "" unless $latlong;
40 push @out, sprintf "%-9s %s %-12.12s %-27.27s %-9s %s %s", $call, $sort, $name, $qth, $homenode, $latlong, $qra;
44 my $ref = DXUser->get_current($call);
46 my $name = $ref->name;
49 my $long = $ref->long;
50 my $node = $ref->node;
51 my $homenode = $ref->homenode;
52 my $lastin = $ref->lastin;
53 my $latlong = DXBearing::lltos($lat, $long) if $lat || $long;
54 my $last = DXUtil::cldatetime($lastin) if $ref->lastin;
56 $qra = DXBearing::lltoqra($lat, $long) if !$qra && ($lat || $long);
58 my ($dx, $bearing, $miles);
60 my ($hlat, $hlong) = ($self->user->lat, $self->user->long);
61 ($hlat, $hlong) = DXBearing::qratoll($self->user->qra) if $self->user->qra && !$hlat && !$hlong;
62 if (!$hlat && !$hlong) {
63 $from = "From $main::mycall";
64 $hlat = $main::mylatitude;
65 $hlong = $main::mylongitude;
67 ($bearing, $dx) = DXBearing::bdist($hlat, $hlong, $lat, $long);
68 $miles = $dx * 0.62133785;
71 my $cref = Route::get($call);
72 my $seek = join(',', $cref->parents) if $cref;
75 push @out, "User : $call (at $seek)";
77 push @out, "User : $call";
79 push @out, "Name : $name" if $name;
80 push @out, "Last Connect : $last" if $last;
81 push @out, "QTH : $qth" if $qth;
82 push @out, "Location : $latlong ($qra)" if $latlong || $qra ;
83 push @out, sprintf("Heading : %.0f Deg %.0f Mi. %.0f Km.", $bearing, $miles, $dx) if $latlong;
84 push @out, "Home Node : $homenode" if $homenode;
86 push @out, $self->msg('usernf', $call);