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/) {
22 foreach my $n (@nodes) {
24 push @{$ch{$dxchan->call}}, $n;
27 foreach my $call (sort keys %ch) {
28 @val = sort {$a->call cmp $b->call} @{$ch{$call}};
30 $call = "($call)" unless DXChannel::get($call)->here;
33 foreach my $ref (@val) {
35 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
41 $s = sprintf "(%s)", $s unless $ref->here;
44 push @l, "" while @l < 6;
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;
68 if (@val == 0 && $node->usercount) {
69 push @l, sprintf "(%d users)", $node->usercount;
71 foreach $call (@val) {
73 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;
77 my $uref = Route::User::get($call);
80 $s = sprintf "(%s)", $call unless $uref->here;
86 push @l, "" while @l < 6;
87 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l;