2 # show/rbn [all|<call>,,,]
4 # This command either lists all rbn users known about (sh/rbn all)
5 # or the ones specified on the command line, If no arguments are present
6 # then it will list all connected rbn/skimmer users.
8 # Copyright (c) 2020 Dirk Koopman G1TLH
12 my ($self, $line) = @_;
13 return (1, $self->msg('e5')) unless $self->priv >= 1;
15 my @call = map {uc $_} split /\s+/, $line;
19 # search thru the user
21 @call = sort map{$_->call} grep {$_->user->call && $_->user->wantrbn} DXChannel::get_all_users();
22 } elsif ($call[0] eq 'ALL') {
24 my ($action, $key, $data) = (0,0,0);
25 for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
26 if (is_callsign($key)) {
27 if ($data =~ /"sort":"[UW]"/ && $data =~ /"wantrbn":1/) {
34 push @out, join(' ', $self->msg('rbnusers'), $main::mycall);
37 foreach my $call (@call) {
40 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
46 push @l, "" while @l < 5;
47 push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l;
51 return (1, @out, $self->msg('rec', $count));