2 # show the cluster routing tables to the user
4 # Copyright (c) 1998 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes
12 my @nodes = (DXNode::get_all());
17 push @out, "Node Callsigns";
18 if ($list[0] && $list[0] =~ /^NOD/) {
19 my @ch = DXProt::get_all_ak1a();
22 foreach $dxchan (@ch) {
23 @val = grep { $_->dxchan == $dxchan } @nodes;
24 my $call = $dxchan->call;
25 $call = "($call)" if $dxchan->here == 0;
30 foreach $call (@val) {
32 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
37 my $s = $call->{call};
38 $s = sprintf "(%s)", $s if $call->{here} == 0;
42 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
45 # build up the screen from the Node table
46 foreach $node (@nodes) {
47 next if scalar @list && !grep $node->call eq $_, @list;
48 my $call = $node->call;
49 $call = "($call)" if $node->here == 0;
52 my $nlist = $node->list;
53 @val = values %{$nlist};
56 foreach $call (@val) {
58 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
63 my $s = $call->{call};
64 $s = sprintf "(%s)", $s if $call->{here} == 0;
68 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;