X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Flockout.pl;h=b5c010fdd9e3274aac7305f7876ce6f6cf90928a;hb=78cf2dcb9be8128af7f8dc5ae37540c9c53c6057;hp=a1e83c3235b7917c34214b23de30fd6c24cb7306;hpb=337f38bfac57a5e5df34c63094fb869b0e2f6bee;p=spider.git diff --git a/cmd/set/lockout.pl b/cmd/set/lockout.pl index a1e83c32..b5c010fd 100644 --- a/cmd/set/lockout.pl +++ b/cmd/set/lockout.pl @@ -13,16 +13,28 @@ 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; - if ($ref = DXUser->get_current($call)) { - $ref->lockout(1); - $ref->put(); - push @out, $self->msg("lockout", $call); + unless ($self->remotecmd) { + if ($ref = DXUser->get_current($call)) { + $ref->lockout(1); + $ref->put(); + push @out, $self->msg("lockout", $call); + } else { + $ref = DXUser->new($call); + $ref->lockout(1); + $ref->put(); + push @out, $self->msg("lockoutc", $call); + } + Log('DXCommand', $self->call . " locked out $call"); } else { - push @out, $self->msg('e3', 'set/lockout', $call); + Log('DXCommand', $self->call . " attempted to lockout $call remotely"); + push @out, $self->msg('sorry'); } } return (1, @out);