add sysop defined 'run' script and privilege commands
[spider.git] / cmd / privilege.pl
diff --git a/cmd/privilege.pl b/cmd/privilege.pl
new file mode 100644 (file)
index 0000000..7d80ceb
--- /dev/null
@@ -0,0 +1,14 @@
+#
+# check the privilege of the user is at least n
+#
+# Copyright (c) 1998 Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @out;
+$line = '1' unless defined $line;
+push @out, $self->msg('e5') unless $line =~ /^\d+$/ && $self->priv >= $line;
+return (1, @out);
+