1. first cut with new routing code. Created NEW_ROUTE branch
[spider.git] / cmd / show / configuration.pl
index ba0f38787e8c987246c21932323d261bb54f91c3..95211a0ff3586d6ce6b081f4daac52f5994092ab 100644 (file)
@@ -9,7 +9,7 @@
 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} (DXNode::get_all());
+my @nodes = sort {$a->call cmp $b->call} (Route::Node::get_all());
 my $node;
 my @l;
 my @val;
@@ -49,12 +49,11 @@ if ($list[0] && $list[0] =~ /^NOD/) {
                $call = "($call)" if $node->here == 0;
                @l = ();
                push @l, $call;
-               my $nlist = $node->list;
-               @val = sort {$a->call cmp $b->call} values %{$nlist};
+               @val = sort $node->users;
 
                my $i = 0;
-               if (@val == 0 && $node->users) {
-                       push @l, sprintf "(%d users)", $node->users;
+               if (@val == 0 && $node->usercount) {
+                       push @l, sprintf "(%d users)", $node->usercount;
                }
                foreach $call (@val) {
                        if ($i >= 5) {
@@ -63,8 +62,9 @@ if ($list[0] && $list[0] =~ /^NOD/) {
                                push @l, "";
                                $i = 0;
                        }
-                       my $s = $call->{call};
-                       $s = sprintf "(%s)", $s if $call->{here} == 0;
+                       my $uref = Route::User::get($call);
+                       my $s = $call;
+                       $s = sprintf "(%s)", $s unless $uref->here;
                        push @l, $s;
                        $i++;
                }