From 41beb204d8c619d5929f9b1368972885e1f49965 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 6 Jun 2001 14:54:41 +0000 Subject: [PATCH] add sh/nodeconfig command --- Changes | 1 + cmd/show/nodeconfig.pl | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 cmd/show/nodeconfig.pl diff --git a/Changes b/Changes index 8b40e6f1..79151ac4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ 06Jun01======================================================================= 1. add stat/route_node and stat/route_user commands 2. add sh/userconfig command (to show backward links to nodes) +3. add sh/nodeconfig command 05Jun01======================================================================= 1. add set/bbs command 2. more work on Routing code. diff --git a/cmd/show/nodeconfig.pl b/cmd/show/nodeconfig.pl new file mode 100644 index 00000000..5fa45b9e --- /dev/null +++ b/cmd/show/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); -- 2.43.0