1. Incorporated sh/st, (un)set/lockout, forward/opername from Iain G0RDI
[spider.git] / cmd / set / lockout.pl
1 #
2 # lock a user out
3 #
4 # Copyright (c) 1998 Iain Phillips G0RDI
5 #
6 # $Id$
7 #
8 my ($self, $line) = @_;
9 my @args = split /\s+/, $line;
10 my $call;
11 # my $priv = shift @args;
12 my @out;
13 my $user;
14 my $ref;
15
16 return (1, $self->msg('e5')) if $self->priv < 9;
17
18 foreach $call (@args) {
19         $call = uc $call;
20         if ($ref = DXUser->get_current($call)) {
21                 $ref->lockout(1);
22                 $ref->put();
23                 push @out, $self->msg("lockout", $call);
24         } else {
25                 push @out, $self->msg('e3', 'set/lockout', $call);
26         }
27 }
28 return (1, @out);