X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fpassword.pl;h=1aa425f610686a229cce343e06e01af1fd6d4e8b;hb=bd14b9e29dbd64a441cc7b65f6b6b92717f8a01b;hp=b408278df2356b12da3a7c2b4571e7e3bfe99712;hpb=4f4cd7ea04f04162f2e755981b4c716deb792cef;p=spider.git diff --git a/cmd/set/password.pl b/cmd/set/password.pl index b408278d..1aa425f6 100644 --- a/cmd/set/password.pl +++ b/cmd/set/password.pl @@ -4,27 +4,26 @@ # Copyright (c) 1998 Iain Phillips G0RDI # 21-Dec-1998 # -# Syntax: set/pass +# Syntax: set/pass # my ($self, $line) = @_; my @args = split /\s+/, $line; -my $call; -my $pass = shift @args; +my $call = shift @args; my @out; my $user; my $ref; return (1, $self->msg('e5')) if $self->priv < 9; -foreach $call (@args) { - $call = uc $call; - if ($ref = DXUser->get_current($call)) { - $ref->passwd($pass); - $ref->put(); - push @out, $self->msg("password", $call); - } else { - push @out, $self->msg('e3', 'User record for', $call); - } +if ($ref = DXUser->get_current($call)) { + $line =~ s/^\s*$call\s+//; + $line =~ s/\s+//og; # remove any blanks + $ref->passwd($line); + $ref->put(); + push @out, $self->msg("password", $call); +} else { + push @out, $self->msg('e3', 'User record for', $call); } + return (1, @out);