-if ($ref = DXUser->get_current($call)) {
- $line =~ s/^\s*$call\s+//;
- $line =~ s/\s+//og; # remove any blanks
- $line =~ s/[{}]//g; # no braces allowed
- $ref->passwd($line);
- $ref->put();
- push @out, $self->msg("password", $call);
+if ($call) {
+ if ($self->priv < 9) {
+ Log('DXCommand', $self->call . " attempted to change password for $call");
+ return (1, $self->msg('e5'));
+ }
+ return (1, $self->msg('e29')) unless @args;
+ if ($ref = DXUser->get_current($call)) {
+ $ref->passwd($args[0]);
+ $ref->put();
+ push @out, $self->msg("password", $call);
+ Log('DXCommand', $self->call . " changed password for $call");
+ } else {
+ push @out, $self->msg('e3', 'User record for', $call);
+ }