X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fisolate.pl;h=daa77f42eb01be26fe65c8d454aaa01025d77167;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=bea994fa7af2e112e16a0fcbeb5e5d1aa50f41ce;hpb=bff9ecf00b14e7d71d9504088a2fd7b9e5115fe1;p=spider.git diff --git a/cmd/show/isolate.pl b/cmd/show/isolate.pl index bea994fa..daa77f42 100644 --- a/cmd/show/isolate.pl +++ b/cmd/show/isolate.pl @@ -5,12 +5,27 @@ # # Copyright (c) 2000 Dirk Koopman G1TLH # -# $Id$ +# # 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) = (0,0,0,0); +for ($action = DXUser::R_FIRST, $count=0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::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)); + +