2 # set list of bad dx nodes
4 # Copyright (c) 2021 - Dirk Koopman G1TLH
8 my ($self, $line) = @_;
9 return (1, $self->msg('e5')) if $self->remotecmd;
11 return (1, $self->msg('e5')) if $self->priv < 6;
14 my @in = split /\s+/, $line;
16 if ($in[0] =~ /^[_\d\w]+$/) {
19 return (1, "set/badip: need [suffix (def: local])] IP, IP-IP or IP/24") unless @in;
22 eval{ $r = DXCIDR::find($ip); };
23 return (1, "set/badip: $ip $@") if $@;
25 push @out, "set/badip: $ip exists, not added";
28 DXCIDR::add($suffix, $ip);
32 my $list = join ' ', @in;
34 DXCIDR::append($suffix, @added);
35 push @out, "set/badip: added $count entries to badip.$suffix : $list" if $count;