X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fnode.pl;h=46e0b32d9d66e072d6896fce55191a6a052ad34f;hb=1172aa77de530206b0dbb648d8489922a518d502;hp=d45cad36155a8e85ef49131ecb2e336cbd48bdf9;hpb=75bf122b6d6d233a83a19be9842b21d546519023;p=spider.git diff --git a/cmd/show/node.pl b/cmd/show/node.pl index d45cad36..46e0b32d 100644 --- a/cmd/show/node.pl +++ b/cmd/show/node.pl @@ -17,15 +17,13 @@ my ($self, $line) = @_; return (1, $self->msg('e5')) unless $self->priv >= 1; -use DB_File; - my @call = map {uc $_} split /\s+/, $line; my @out; my $count; # search thru the user for nodes -unless (@call) { - +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]'}) { @@ -33,11 +31,13 @@ unless (@call) { ++$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 +60,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;