X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fstat%2Fnodeconfig.pl;fp=cmd%2Fstat%2Fnodeconfig.pl;h=5fa45b9eabc984d9a2eabd0dd7b04e87e45e51a8;hb=d7a259b56406b17ce5179aac85a3b1f07664147d;hp=0000000000000000000000000000000000000000;hpb=41beb204d8c619d5929f9b1368972885e1f49965;p=spider.git diff --git a/cmd/stat/nodeconfig.pl b/cmd/stat/nodeconfig.pl new file mode 100644 index 00000000..5fa45b9e --- /dev/null +++ b/cmd/stat/nodeconfig.pl @@ -0,0 +1,22 @@ +# +# show who all the nodes 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 @nodes = sort {$a->call cmp $b->call} values %Route::Node::list; + +foreach my $nref (@nodes) { + my $ncall = $nref->call; + next if @list && !grep $ncall =~ m|$_|, @list; + my $call = $nref->user_call; + my $l = join ',', (map {my $ref = Route::Node::get($_); $ref ? ($ref->user_call) : ("$_?")} sort @{$nref->parent}); + push @out, "$call->$l"; +} + +return (1, @out);