4 # show all registered users
6 # Copyright (c) 2001 Dirk Koopman G1TLH
13 my ($self, $line) = @_;
14 return (1, $self->msg('e5')) unless $self->priv >= 9;
21 $line =~ s/[^\w\-\/]+//g;
25 if ($self->{_nospawn}) {
26 @out = generate($self, $line);
28 @out = $self->spawn_cmd("show/registered $line", sub { return (generate($self, $line)); });
41 # dbg("set/register line: $line");
44 $call{$_} = 1 for split /\s+/, $line;
47 my ($action, $count, $key, $data) = (0,0,0,0);
49 for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
50 if ($data =~ m{registered}) {
51 $call{$key} = 1; # possible candidate
56 foreach $key (sort keys %call) {
57 my $u = DXUser::get_current($key);
58 if ($u && defined (my $r = $u->registered)) {
59 push @val, "${key}($r)";
65 push @out, "Registration is " . ($main::reqreg ? "Required" : "NOT Required");
66 foreach my $call (@val) {
68 push @out, sprintf "%-14s %-14s %-14s %-14s %-14s", @l;
74 push @l, "" while @l < 5;
75 push @out, sprintf "%-14s %-14s %-14s %-14s %-14s", @l;
78 push @out, $self->msg('rec', $count);