X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fstat%2Fuserconfig.pl;fp=cmd%2Fstat%2Fuserconfig.pl;h=f4321160574043c7d0d055d7e61ad4d38b75edab;hb=d7a259b56406b17ce5179aac85a3b1f07664147d;hp=0000000000000000000000000000000000000000;hpb=41beb204d8c619d5929f9b1368972885e1f49965;p=spider.git diff --git a/cmd/stat/userconfig.pl b/cmd/stat/userconfig.pl new file mode 100644 index 00000000..f4321160 --- /dev/null +++ b/cmd/stat/userconfig.pl @@ -0,0 +1,22 @@ +# +# show who all the users are connected to +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +my ($self, $line) = @_; +my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes +my @out; +my @users = sort {$a->call cmp $b->call} values %Route::User::list; + +foreach my $uref (@users) { + my $ucall = $uref->call; + next if @list && !grep $ucall =~ m|$_|, @list; + my $call = $uref->user_call; + my $l = join ',', (map {my $ref = Route::Node::get($_); $ref ? ($ref->user_call) : ("$_?")} sort @{$uref->parent}); + push @out, "$call->$l"; +} + +return (1, @out);