From: minima Date: Sat, 4 Nov 2000 12:12:15 +0000 (+0000) Subject: add unset/badnode X-Git-Tag: R_1_45~42 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2bd682330ce9b04c95ddf05715cfb643da2df0ea;p=spider.git add unset/badnode improve help on set/unset badnodes --- diff --git a/Changes b/Changes index d559575c..4fbc514f 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ ones). 2. Have only one is_callsign and not an iscallsign as well. 3. Add set/hops and show/hops commands. +4. Add unset/badnode command and put some help in for these commands 03Nov00======================================================================= 1. allow - in filter strings 2. store only the filter expression NOTE BENE: you will need to clear all diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index bcc5196f..ac268bdc 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -805,6 +805,24 @@ SP is an alias for SEND PRIVATE === 5^SET/ARCLUSTER [..]^Make the callsign an AR-Cluster node +=== 6^SET/BADNODE ^Stop spots from this callsign being propagated +=== 6^UNSET/BADNODE ^Allow spots from this callsign again +Setting a callsign as a 'badnode' will prevent spots from that node +going any further. They will not be displayed and they will not be +sent onto other nodes. + +The call can be a full or partial call (or a prefix), eg:- + + set/badnode K1TTT + +will stop anything from K1TTT (including any SSID's) + + unset/badnode K1TTT + +will allow spots from him again. + +Use with extreme care. This command may well be superceeded by FILTERing. + === 0^SET/BEEP^Add a beep to DX and other messages on your terminal === 0^UNSET/BEEP^Stop beeps for DX and other messages on your terminal @@ -978,6 +996,10 @@ Tell the system where you are. For example:- === 0^SET/WX^Allow WX messages to come out on your terminal === 0^UNSET/WX^Stop WX messages coming out on your terminal +=== 6^SHOW/BADNODE^Show all the bad nodes in the system +Display all the bad node callsigns in the system, see SET/BADNODE +for more information. + === 0^SHOW/CALL ^Show any callbook details on a callsign This command queries an international callbook server on the internet and returns any information available for that callsign. diff --git a/cmd/set/badnode.pl b/cmd/set/badnode.pl index 13d91e77..8af48111 100644 --- a/cmd/set/badnode.pl +++ b/cmd/set/badnode.pl @@ -10,8 +10,9 @@ 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 $_; push @DXProt::nodx_node, $call; - push @out, "$call is now a badnode"; + push @out, $self->msg('badnode1', $call); } return (1, @out); diff --git a/cmd/show/badnode.pl b/cmd/show/badnode.pl index e13e6c23..ff59c68d 100644 --- a/cmd/show/badnode.pl +++ b/cmd/show/badnode.pl @@ -7,8 +7,8 @@ # my ($self, $line) = @_; return (1, $self->msg('e5')) if $self->priv < 6; -my @out; +my @out = ($self->msg('badnode3')); for (@DXProt::nodx_node) { - push @out, "$_ is a badnode"; + push @out, $_; } return (1, @out); diff --git a/cmd/unset/badnode.pl b/cmd/unset/badnode.pl new file mode 100644 index 00000000..4e42e28d --- /dev/null +++ b/cmd/unset/badnode.pl @@ -0,0 +1,18 @@ +# +# unset list of bad nodes +# +# Copyright (c) 1998 - Dirk Koopman G1TLH +# +# $Id$ +# +my ($self, $line) = @_; +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); diff --git a/perl/Messages b/perl/Messages index 0840c93f..1c3ebe4e 100644 --- a/perl/Messages +++ b/perl/Messages @@ -14,6 +14,9 @@ package DXM; already => '$_[0] already connnected', anns => 'Announce flag set on $_[0]', annu => 'Announce flag unset on $_[0]', + badnode1 => '$_[0] is now a bad node', + badnode2 => '$_[0] is now a good node', + badnode3 => 'List of Bad Nodes:-', bbse1 => 'Please enter your BBS address,, set/bbs ', bbs => 'Your BBS Address is now \"$_[0]\"', beepoff => 'Beeps are now off',