add the ability to limit no of connections
[spider.git] / cmd / stat / nodeconfig.pl
1 #
2 # show who all the nodes are connected to
3 #
4 # Copyright (c) 2001 Dirk Koopman G1TLH
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my @list = map { uc } split /\s+/, $line;           # list of callsigns of nodes
11 my @out;
12 my @nodes = sort {$a->call cmp $b->call} values %Route::Node::list;
13
14 foreach my $nref (@nodes) {
15         my $ncall = $nref->call;
16         next if @list && !grep $ncall =~ m|$_|, @list;
17         my $call = $nref->user_call;
18         my $l = join ',', (map {my $ref = Route::Node::get($_); $ref ? ($ref->user_call) : ("$_?")} sort $nref->parents);
19         push @out, "$call->$l";
20 }
21
22 return (1, @out);