9efa5b1f9176e688ddd5f25321d2f5da1d6fe7fb
[spider.git] / cmd / show / station.pl
1 #
2 # show the station details
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my @f = split /\s+/, uc $line;
11 my @out;
12 my $call;
13
14 if (@f == 0) {
15   return (1, "*** no station specified ***") if ($self->priv < 5); 
16   my @calls = DXUser::get_all_calls();
17   foreach $call (@calls) {
18     my $ref = DXUser->get_current($call);
19         next if !$ref;
20         my $sort = $ref->sort;
21         my $qth = $ref->qth;
22         my $home = $ref->node;
23     push @out, "$call $sort $home $qth";
24   }
25 } else {
26   foreach $call (@f) {
27     my $ref = DXUser::get_current($call);
28         if ($ref) {
29           my $name;
30       my $qth;
31           my $lat;
32           my $long;
33           my $node;
34           my $homenode;
35           push @out, "$call $qth";
36         } else {
37           push @out, "$call not known";
38         }
39   }
40 }
41
42 return (1, @out);