4. Fiddle with the lockout mechanism so that set/login g1tlh also locks out
[spider.git] / cmd / stat / user.pl
1 #
2 # show either the current user or a nominated set
3 #
4 # $Id$
5 #
6
7 my ($self, $line) = @_;
8 return (1, $self->msg('e5')) if $self->priv < 1;
9 my @list = split /\s+/, $line;  # generate a list of callsigns
10 @list = ($self->call) if !@list; # my channel if no callsigns
11
12 my $call;
13 my @out;
14 foreach $call (@list) {
15         $call = uc $call;
16         my $ref = DXUser->get_current($call);
17         if ($ref) {
18                 if ($self->consort eq 'ax25') {
19                         @out = grep { !/(Password|Privilege)/ } print_all_fields($self, $ref, "User Information $call");
20                 } else {
21                         @out = print_all_fields($self, $ref, "User Information $call");
22                 }
23         } else {
24                 push @out, "User: $call not found";
25         }
26         push @out, "" if @list > 1;
27 }
28
29 return (1, @out);