# $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
+use strict;
+my ($self, $line) = @_;
+my @list = split /\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);