X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fusers.pl;h=8cbe85770967388f43a8895c590f629f2930345b;hb=2546ef0cfaaca39e65985e414258071a636979af;hp=2e69786b4376f2c4fa46dd0db350071ce8787269;hpb=fdc1150da7dbd9c1094d8df7a4744fb917017ed2;p=spider.git diff --git a/cmd/show/users.pl b/cmd/show/users.pl index 2e69786b..8cbe8577 100644 --- a/cmd/show/users.pl +++ b/cmd/show/users.pl @@ -1,15 +1,38 @@ # -# show either the current user or a nominated set +# show the users on this cluster from the routing tables +# +# Copyright (c) 1998 Dirk Koopman G1TLH # # $Id$ # my ($self, $line) = @_; -my @list = DXChannel->get_all(); -my $chan; +my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes my @out; -foreach $chan (@list) { - push @out, "Callsign: $chan->{call}"; +my $node = (DXNode->get($main::mycall)); + +push @out, "Callsigns connected to $main::mycall"; +my $call; +my $i = 0; +my @l; +my $nlist = $node->list; +my @val = values %{$nlist}; +foreach $call (@val) { + if (@list) { + next if !grep $call->call eq $_, @list; + } + if ($i >= 5) { + push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; + @l = (); + $i = 0; + } + my $s = $call->{call}; + $s = sprintf "(%s)", $s if $call->{here} == 0; + push @l, $s; + $i++; } +push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; + return (1, @out); +