fix more 5.8 isms
[spider.git] / cmd / show / configuration.pl
index cb9f1946297d79179a720c10f675fb23016cc7ee..af81ad2101610eab36832f2e41dc34a098f7e9af 100644 (file)
@@ -14,9 +14,9 @@ my $node;
 my @l;
 my @val;
 
-push @out, "Node         Callsigns";
+push @out, $self->msg('showconf');
 if ($list[0] && $list[0] =~ /^NOD/) {
-       my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_nodes();
+       my @ch = sort {$a->call cmp $b->call} grep {$_->is_node || $_->is_aranea} DXChannel::get_all();
        my $dxchan;
        
        foreach $dxchan (@ch) {
@@ -45,9 +45,19 @@ if ($list[0] && $list[0] =~ /^NOD/) {
                push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
        }
 } else {
+       my $printall;
+       
+       $printall = 1 if @list && $list[0] =~ /^ALL/i;
+       
        # build up the screen from the Node table
        foreach $node (@nodes) {
-               next if scalar @list && !grep $node->call =~ /^$_/, @list;
+               unless ($printall) {
+                       if (@list) {
+                               next unless grep $node->call =~ /^$_/, @list;
+                       } else {
+                               next unless grep $node->dxcc == $_, @main::my_cc;
+                       }
+               }
                my $call = $node->call;
                @l = ();
                $call ||= '???';