Make it work with badip system active
[spider.git] / cmd / set / badip.pl
index 3c4578ba444caf8c59796c36ef253691a61e6006..1ed8225adb050de98ac87e7d388860c8785125e6 100644 (file)
@@ -9,6 +9,8 @@ my ($self, $line) = @_;
 return (1, $self->msg('e5')) if $self->remotecmd;
 # are we permitted?
 return (1, $self->msg('e5')) if $self->priv < 6;
+return (1, q{Please install Net::CIDR::Lite or libnet-cidr-lite-perl to use this command}) unless $DXCIDR::active;
+
 my @out;
 my @added;
 my @in = split /\s+/, $line;
@@ -31,6 +33,7 @@ for my $ip (@in) {
 my $count = @added;
 my $list = join ' ', @in;
 DXCIDR::clean_prep();
+#$DB::single = 1;
 DXCIDR::append($suffix, @added);
 push @out, "set/badip: added $count entries to badip.$suffix : $list" if $count;
 return (1, @out);