spider/cmd/sysop.pl
Dirk Koopman ab811a0c90 Change DXUser->get* to DXUser::get*
and also check the output of thaw more carefully, complain if it
isn't a DXUser.
2008-05-06 15:00:00 +01:00

25 lines
490 B
Perl

#
# the sysop command for allowing people who have privileges that
# are denied them by connecting remotely
#
# Copyright (c) 1999 Dirk Koopman
#
my ($self, $line) = @_;
my $user = DXUser::get_current($self->call);
my $passwd = $user->passwd if $user;
my $lth = length $passwd;
$lth = 100 unless $lth;
my ($i, $r);
my @out;
my @list;
for ($i = 0; $i < 5; ++$i) {
push @list, int rand($lth);
}
$self->passwd(\@list);
$self->state('sysop');
push @out, join(' ', @list);
return (1, @out);