X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fisolate.pl;fp=cmd%2Fshow%2Fisolate.pl;h=c874e8a8f930f46ef16e818da4de018238dea7af;hb=32849fc856cb0cb825657c0013dfefb125a96bab;hp=bea994fa7af2e112e16a0fcbeb5e5d1aa50f41ce;hpb=91cb091ed723c5650202345ae9c4f0277e36f0a8;p=spider.git diff --git a/cmd/show/isolate.pl b/cmd/show/isolate.pl index bea994fa..c874e8a8 100644 --- a/cmd/show/isolate.pl +++ b/cmd/show/isolate.pl @@ -11,6 +11,21 @@ my ($self, $line) = @_; return (1, $self->msg('e5')) unless $self->priv >= 1; -# search thru the user for nodes -my @out = sort map { my $ref; (($ref = DXUser->get_current($_)) && $ref->isolate) ? $_ : () } DXUser::get_all_calls; -return (1, @out); +my @out; + +use DB_File; + +my ($action, $count, $key, $data); +for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) { + if ($data =~ m{isolate =>}) { + my $u = DXUser->get_current($key); + if ($u && $u->isolate) { + push @out, $key; + ++$count; + } + } +} + +return (1, @out, $self->msg('rec', $count)); + +