remove $Id$ strings from everywhere that I can find
[spider.git] / cmd / set / lockout.pl
index 492120b9b2a008f65c9c74b5b67e7fee5d90c1d6..ac7cc83a5d11a15afc33c39b5919ef8aa33b4f99 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Copyright (c) 1998 Iain Phillips G0RDI
 #
-# $Id$
+#
 #
 my ($self, $line) = @_;
 my @args = split /\s+/, $line;
@@ -13,11 +13,14 @@ my @out;
 my $user;
 my $ref;
 
-return (1, $self->msg('e5')) if $self->priv < 9;
+if ($self->priv < 9) {
+       Log('DXCommand', $self->call . " attempted to lockout @args");
+       return (1, $self->msg('e5'));
+}
 
 foreach $call (@args) {
        $call = uc $call;
-       unless ($self->remotecmd) {
+       unless ($self->remotecmd || $self->inscript) {
                if ($ref = DXUser->get_current($call)) {
                        $ref->lockout(1);
                        $ref->put();
@@ -28,7 +31,9 @@ foreach $call (@args) {
                        $ref->put();
                        push @out, $self->msg("lockoutc", $call);
                }
+               Log('DXCommand', $self->call . " locked out $call");
        } else {
+               Log('DXCommand', $self->call . " attempted to lockout $call remotely");
                push @out, $self->msg('sorry');
        }
 }