X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=cmd%2Fshow%2Fchannel.pl;h=e1ef761083b620b1e8372c098e7035ceae44e967;hp=4b4a7920e5ea906b0413a34c3b3be55d2cb0becc;hb=07ea293f3919d2da76220b5fbc55b734008ed44c;hpb=b2e4d1c7378cfd98bd8cdf9304c2bd6e5d4b802c diff --git a/cmd/show/channel.pl b/cmd/show/channel.pl index 4b4a7920..e1ef7610 100644 --- a/cmd/show/channel.pl +++ b/cmd/show/channel.pl @@ -4,25 +4,21 @@ # $Id$ # -my $self = shift; -#return (0) if ($self->priv < 9); # only console users allowed -my @list = split; # generate a list of callsigns -@list = ($self->call) if !@list; # my channel if no callsigns +my ($self, $line) = @_; +my @list = /\s+/, $line; # generate a list of callsigns +@list = ($self->call) if (!@list || $self->priv < 9); # my channel if no callsigns my $call; my @out; foreach $call (@list) { + $call = uc $call; my $ref = DXChannel->get($call); - return (0, "Channel: $call not found") if !$ref; - - my @fields = $ref->fields; - my $field; - push @out, "User Information $call"; - foreach $field (@fields) { - my $prompt = $ref->field_prompt($field); - my $val = $ref->{$field}; - push @out, "$prompt: $val"; - } + if ($ref) { + @out = print_all_fields($self, $ref, "Channe Information $call"); + } else { + return (0, "Channel: $call not found") if !$ref; + } + push @out, "" if @list > 1; } return (1, @out);