From: minima Date: Thu, 7 Jun 2001 10:42:23 +0000 (+0000) Subject: move userconfig and nodeconfig to stat X-Git-Tag: OLDROUTE_1_48~3 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7a259b56406b17ce5179aac85a3b1f07664147d;p=spider.git move userconfig and nodeconfig to stat fix robs with localusers not being taken out of the routing tables --- diff --git a/cmd/Aliases b/cmd/Aliases index 28995ee3..f6b8408a 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -97,6 +97,7 @@ package CmdAlias; '^set/noww', 'unset/wwv', 'unset/wwv', '^set/nowx', 'unset/wx', 'unset/wx', '^sh$', 'show', 'show', + '^sh\w*/u$', 'show/user', 'show/user', '^sh\w*/bu', 'show/files bulletins', 'show/files', '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration', '^sh\w*/c$', 'show/configuration', 'show/configuration', diff --git a/cmd/show/nodeconfig.pl b/cmd/show/nodeconfig.pl deleted file mode 100644 index 5fa45b9e..00000000 --- a/cmd/show/nodeconfig.pl +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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); diff --git a/cmd/show/userconfig.pl b/cmd/show/userconfig.pl deleted file mode 100644 index f4321160..00000000 --- a/cmd/show/userconfig.pl +++ /dev/null @@ -1,22 +0,0 @@ -# -# 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); 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); 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); diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 0f80232a..fc43a4e1 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -416,11 +416,8 @@ sub disconnect $node->dxchan($DXProt::me); } - my $pref = Route::Node::get($main::mycall); - if ($pref) { - my @rout = $pref->del_user($main::mycall); - dbg('route', "B/C PC17 on $main::mycall for: $call"); - } + my @rout = $main::routeroot->del_user($call); + dbg('route', "B/C PC17 on $main::mycall for: $call"); # I was the last node visited $self->user->node($main::mycall); diff --git a/perl/Route.pm b/perl/Route.pm index 0ebb365c..47b87dac 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -166,6 +166,11 @@ sub config return @out; } +# +# routing things +# + + # # track destruction #