X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fnode.pl;h=d45cad36155a8e85ef49131ecb2e336cbd48bdf9;hb=db143ea6ee006dd7ffc360fcf022459d68412976;hp=c18d8fb9376dc8d71e18c48ac68243dfd5dcd8a0;hpb=91cb091ed723c5650202345ae9c4f0277e36f0a8;p=spider.git diff --git a/cmd/show/node.pl b/cmd/show/node.pl index c18d8fb9..d45cad36 100644 --- a/cmd/show/node.pl +++ b/cmd/show/node.pl @@ -17,21 +17,21 @@ 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) { -# the official way -# @call = sort map { my $ref; (($ref = DXUser->get_current($_)) && $ref->sort ne 'U') ? $_ : () } DXUser::get_all_calls; - use DB_File; - my ($action, $count, $key, $data); - for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) { + 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; } - ++$count; } } @@ -69,9 +69,10 @@ foreach $call (@call) { } else { push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : " "); } + ++$count; } -return (1, @out); +return (1, @out, $self->msg('rec', $count));