+25Oct01=======================================================================
+1. added unset/password command to allow sysops (only) to completely delete
+and remove a user's password.
24Oct01=======================================================================
1. added (un)set/register, show/registered commands which when a 'set/var
$main::reqreg = 1' is done in the startup script will require users to
command is executed in the startup script, then a password prompt is
given after the normal 'login: ' prompt.
+=== 9^UNSET/PASSWORD <call> ...^Delete (remove) a user's password
+This command allows the sysop to completely delete and remove a
+password for a user.
+
=== 5^SET/SPIDER <call> [<call>..]^Make the callsign an DXSpider node
Tell the system that the call(s) are to be treated as DXSpider node and
fed new style DX Protocol rather normal user commands.
--- /dev/null
+#
+# unset a user's password
+#
+# Copyright (c) 2001 Dirk Koopman G1TLH
+#
+# Syntax: unset/pass <callsign> ...
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my @out;
+my $user;
+my $ref;
+
+if ($self->remotecmd) {
+ Log('DXCommand', $self->call . " attempted to unset password for @args remotely");
+ return (1, $self->msg('e5'));
+}
+
+if ($self->priv < 9) {
+ Log('DXCommand', $self->call . " attempted to unset password for @args");
+ return (1, $self->msg('e5'));
+}
+
+for (@args) {
+ my $call = uc $_;
+ if ($ref = DXUser->get_current($call)) {
+ $ref->unset_passwd;
+ $ref->put();
+ push @out, $self->msg("passwordu", $call);
+ Log('DXCommand', $self->call . " unset password for $call");
+ } else {
+ push @out, $self->msg('e3', 'User record for', $call);
+ }
+}
+
+return (1, @out);
my $self = shift;
return $self->{sort} eq 'A';
}
+
+sub unset_passwd
+{
+ my $self = shift;
+ delete $self->{passwd};
+}
1;
__END__
pagelth => 'Page Length is now $_[0]',
passerr => 'Please use: SET/PASS <password> <callsign>',
password => 'Password set or changed for $_[0]',
+ passwordu => 'Password removed for $_[0]',
pingo => 'Ping Started to $_[0]',
pingi => 'Ping Returned from $_[0] $_[1] (Ave $_[2]) secs',
pinge1 => 'Cannot ping yourself!',