From: djk Date: Mon, 15 Mar 1999 21:44:08 +0000 (+0000) Subject: added sysop command X-Git-Tag: R_1_24^0 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=c001af008776b1822d9e99a28bfef500cf2d0844;p=spider.git added sysop command --- diff --git a/cmd/sysop.pl b/cmd/sysop.pl new file mode 100644 index 00000000..ba42ba60 --- /dev/null +++ b/cmd/sysop.pl @@ -0,0 +1,24 @@ +# +# 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);