Change DXUser->get* to DXUser::get*
[spider.git] / cmd / sysop.pl
1 #
2 # the sysop command for allowing people who have privileges that
3 # are denied them by connecting remotely
4 #
5 # Copyright (c) 1999 Dirk Koopman
6 #
7
8 my ($self, $line) = @_;
9 my $user = DXUser::get_current($self->call);
10 my $passwd = $user->passwd if $user;
11 my $lth = length $passwd;
12 $lth = 100 unless $lth;
13 my ($i, $r);
14 my @out;
15 my @list;
16
17 for ($i = 0; $i < 5; ++$i) {
18         push @list, int rand($lth);
19 }
20
21 $self->passwd(\@list);
22 $self->state('sysop');
23 push @out, join(' ', @list);
24 return (1, @out);