fixed problems with show/channel
[spider.git] / cmd / show / channel.pl
1 #
2 # show the channel status
3 #
4 # $Id$
5 #
6
7 use strict;
8 my ($self, $line) = @_;
9 my @list = split /\s+/, $line;            # generate a list of callsigns
10 @list = ($self->call) if !@list || $self->priv < 9;  # my channel if no callsigns
11
12 my $call;
13 my @out;
14 foreach $call (@list) {
15   $call = uc $call;
16   my $ref = DXChannel->get($call);
17   if ($ref) {
18     @out = print_all_fields($self, $ref, "Channe Information $call");
19   } else {
20     return (0, "Channel: $call not found") if !$ref;
21   }
22   push @out, "" if @list > 1;
23 }
24
25 return (1, @out);
26
27