2. speeded up the show/node command by using the DB_File interface and
[spider.git] / cmd / show / isolate.pl
1 #
2 # show/isolate
3 #
4 # show all excluded users 
5 #
6 # Copyright (c) 2000 Dirk Koopman G1TLH
7 #
8 # $Id$
9 #
10
11 my ($self, $line) = @_;
12 return (1, $self->msg('e5')) unless $self->priv >= 1;
13
14 my @out;
15
16 use DB_File;
17
18 my ($action, $count, $key, $data);
19 for ($action = R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = R_NEXT) {
20         if ($data =~ m{isolate =>}) {
21                 my $u = DXUser->get_current($key);
22                 if ($u && $u->isolate) {
23                         push @out, $key;
24                         ++$count;
25                 }
26         }
27
28
29 return (1, @out, $self->msg('rec', $count));
30
31