X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fnode.pl;h=53a974ca1627f30b3e926aa913fa1076faa329af;hb=6b6eda0362049fd67809f2789e523708a1a8cb13;hp=2cdf84a380a84749def463fef204bff08544ca2b;hpb=699e2b8f9d924df78f55f69dfeded213f158b121;p=spider.git diff --git a/cmd/show/node.pl b/cmd/show/node.pl index 2cdf84a3..53a974ca 100644 --- a/cmd/show/node.pl +++ b/cmd/show/node.pl @@ -24,20 +24,22 @@ my @out; my $count; # search thru the user for nodes -unless (@call) { - - my ($action, $key, $data); - for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) { +if ($call[0] eq 'ALL') { + shift @call; + my ($action, $key, $data) = (0,0,0); + for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) { if ($data =~ m{sort => '[ACRSX]'}) { push @call, $key; ++$count; } } +} elsif (@call == 0) { + @call = map {$_->call} DXChannel::get_all_nodes(); } my $call; foreach $call (@call) { - my $clref = DXCluster->get_exact($call); + my $clref = Route::Node::get($call); my $uref = DXUser->get_current($call); my ($sort, $ver); @@ -60,7 +62,7 @@ foreach $call (@call) { $sort = "Spider"; $ver = $main::version; } else { - $ver = $clref->pcversion if $clref && $clref->pcversion; + $ver = $clref->version if $clref && $clref->version; } my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;