4 # show all registered users
6 # Copyright (c) 2001 Dirk Koopman G1TLH
13 my ($self, $line) = @_;
15 return (1, $self->msg('e5')) unless $self->priv >= 9;
20 $line =~ s/[^\w\-\/]+//g;
24 if ($self->{_nospawn}) {
25 @out = generate($self, $line);
27 @out = $self->spawn_cmd("show/registered $line", sub { return (generate($self, $line)); });
41 my ($action, $count, $key, $data) = (0,0,0,0);
42 # eval qq{for (\$action = DXUser::R_FIRST, \$count = 0; !\$DXUser::dbm->seq(\$key, \$data, \$action); \$action = DXUser::R_NEXT) {
43 # if (\$data =~ m{registered}) {
44 # if (!\$line || (\$line && \$key =~ /^$line/)) {
45 # my \$u = DXUser::get_current(\$key);
46 # if (\$u && \$u->registered) {
56 @val = DXUser::scan(sub {
59 # cheat, don't decode because we can easily pull it out from the json test
60 return $l =~ m{"registered":1} ? $k : ();
63 for my $call (split /\s+/, $line) {
64 my $l = DXUser::get($call, 1);
66 next unless $l =~ m{"registered":1};
73 foreach my $call (@val) {
75 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
81 push @l, "" while @l < 5;
82 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
86 push @out, , $self->msg('rec', $count);