add privilege checks to (un)set/show/bad* cmds
[spider.git] / cmd / unset / badspotter.pl
index 5c2433e9289d00703cfdc25682ac15a4cfa33770..20c5569f0c3d680c2d87e5d46b9b34a34a82e6d1 100644 (file)
@@ -3,9 +3,13 @@
 #
 # Copyright (c) 1998 - Dirk Koopman G1TLH
 #
-# $Id$
+#
 #
 my ($self, $line) = @_;
+return (1, $self->msg('e5')) if $self->remotecmd;
+# are we permitted?
+return (1, $self->msg('e5')) if $self->priv < 6;
+$line = join(' ', map {s|[/-]\d+$||; $_} split(/\s+/, $line));
 $line = join(' ', map {s|[/-]\d+$||; $_} split(/\s+/, $line));
 return $DXProt::badspotter->unset(8, $self->msg('e6'), $self, $line);