move userconfig and nodeconfig to stat
authorminima <minima>
Thu, 7 Jun 2001 10:42:23 +0000 (10:42 +0000)
committerminima <minima>
Thu, 7 Jun 2001 10:42:23 +0000 (10:42 +0000)
fix robs with localusers not being taken out of the routing tables

cmd/Aliases
cmd/show/nodeconfig.pl [deleted file]
cmd/show/userconfig.pl [deleted file]
cmd/stat/nodeconfig.pl [new file with mode: 0644]
cmd/stat/userconfig.pl [new file with mode: 0644]
perl/DXCommandmode.pm
perl/Route.pm

index 28995ee31737aa0dc83c35b84273819a0a1295c6..f6b8408ade09202d75d3b8c873734d73c3a428a4 100644 (file)
@@ -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 (file)
index 5fa45b9..0000000
+++ /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 (file)
index f432116..0000000
+++ /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 (file)
index 0000000..5fa45b9
--- /dev/null
@@ -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 (file)
index 0000000..f432116
--- /dev/null
@@ -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);
index 0f80232ac8432636ef1d65a6f9a0bf609672e960..fc43a4e1139bdbe025ddacea311699316e43bea5 100644 (file)
@@ -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);
index 0ebb365ca66c755767578cf9393431a539b10a6a..47b87dac8a6fcfd8cf82af6f687a37f6036f566f 100644 (file)
@@ -166,6 +166,11 @@ sub config
        return @out;
 }
 
+#
+# routing things
+#
+
+
 #
 # track destruction
 #