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 = sort {$a->call cmp $b->call} (Route::Node::get_all());
17 push @out, $self->msg('showconf');
18 if ($list[0] && $list[0] =~ /^NOD/) {
19 my @ch = sort {$a->call cmp $b->call} DXChannel::get_all_nodes();
22 foreach $dxchan (@ch) {
23 @val = sort {$a->call cmp $b->call} grep { $_->dxchan == $dxchan } @nodes;
25 my $call = $dxchan->call;
27 $call = "($call)" unless $dxchan->here;
31 foreach my $ref (@val) {
33 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
40 $s = sprintf "(%s)", $s unless $ref->here;
44 push @l, "" while ($i++ < 5);
45 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
50 $printall = 1 if @list && $list[0] =~ /^ALL/i;
52 # build up the screen from the Node table
53 foreach $node (@nodes) {
56 next unless grep $node->call =~ /^$_/, @list;
58 next unless grep $node->dxcc == $_, @main::my_cc;
61 my $call = $node->call;
64 $call = "($call)" unless $node->here;
66 @val = sort $node->users;
69 if (@val == 0 && $node->usercount) {
70 push @l, sprintf "(%d users)", $node->usercount;
72 foreach $call (@val) {
74 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
79 my $uref = Route::User::get($call);
82 $s = sprintf "(%s)", $call unless $uref->here;
89 push @l, "" while ($i++ < 5);
90 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;