added sysop command R_1_24
authordjk <djk>
Mon, 15 Mar 1999 21:44:08 +0000 (21:44 +0000)
committerdjk <djk>
Mon, 15 Mar 1999 21:44:08 +0000 (21:44 +0000)
cmd/sysop.pl [new file with mode: 0644]

diff --git a/cmd/sysop.pl b/cmd/sysop.pl
new file mode 100644 (file)
index 0000000..ba42ba6
--- /dev/null
@@ -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);