2 # set a user's passphrase
4 # Copyright (c) 2002 Dirk Koopman G1TLH
6 # Syntax: set/passphrase <callsign> <password>
9 my ($self, $line) = @_;
10 my @args = split /\s+/, $line, 2;
11 my $call = shift @args;
16 if ($self->remotecmd || $self->inscript) {
17 $call ||= $self->call;
18 Log('DXCommand', $self->call . " attempted to change passphrase for $call remotely");
19 return (1, $self->msg('e5'));
23 if ($self->priv < 9) {
24 Log('DXCommand', $self->call . " attempted to change passphrase for $call");
25 return (1, $self->msg('e5'));
27 return (1, $self->msg('e29')) unless @args;
28 if ($ref = DXUser->get_current($call)) {
29 $ref->passphrase($args[0]);
31 push @out, $self->msg("passphrase", $call);
32 Log('DXCommand', $self->call . " changed passphrase for $call");
34 push @out, $self->msg('e3', 'User record for', $call);