fix ssid handling on (un)set/badnode.pl
[spider.git] / cmd / unset / badnode.pl
index 4e42e28d530690e8f41c29c3e71cf2aa712521c3..c104be27fc52597a64dd5a8762da9451c9233551 100644 (file)
@@ -1,18 +1,14 @@
 #
-# unset list of bad nodes
+# set list of bad dx nodes
 #
 # 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;
-my @f = split /\s+/, $line;
-my @out;
-for (@f) {
-       return (1, $self->msg('e19')) if /[^\s\w_\-\/]/;
-       my $call = uc $_;
-       @DXProt::nodx_node = grep { !$call =~ /^$_/ } @DXProt::nodx_node;
-       push @out, $self->msg('badnode2', $call);
-}
-return (1, @out);
+#$line = join(' ', map {s|[/-]\d+$||; $_} split(/\s+/, $line));
+return $DXProt::badnode->unset(8, $self->msg('e12'), $self, $line);
+