From: minima Date: Wed, 13 Jun 2001 15:28:41 +0000 (+0000) Subject: add missing clear/route command X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c96125fa684151fbae1daa2c76ca5522d0a09c0;p=spider.git add missing clear/route command --- diff --git a/Changes b/Changes index d359471a..a62ab090 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ 13Jun01======================================================================= 1. fix init cnd rinit cmds +2. add missing clear/route cmd 10Jun01======================================================================= 1. fix set/here and unset/here 2. fix indirect routing to users two hops away diff --git a/cmd/clear/route.pl b/cmd/clear/route.pl new file mode 100644 index 00000000..9cc3705a --- /dev/null +++ b/cmd/clear/route.pl @@ -0,0 +1,37 @@ +# +# clear filters commands +# +# Copyright (c) 2000 Dirk Koopman G1TLH +# +# $Id$ +# +my ($self, $line) = @_; +my @f = split /\s+/, $line; +my @out; +my $dxchan = $self; +my $sort = 'route'; +my $flag; +my $fno = 1; +my $call = $dxchan->call; + +my $f = lc shift @f if @f; +if ($self->priv >= 8) { + if (is_callsign(uc $f)) { + my $uref = DXUser->get(uc $f); + $call = $uref->call if $uref; + } + if (@f) { + $f = lc shift @f; + if ($f eq 'input') { + $flag = 'in'; + $f = shift @f if @f; + } + } +} + +$fno = $f if $f; +my $filter = Filter::read_in($sort, $call, $flag); +Filter::delete($sort, $call, $flag, $fno); +$flag = $flag ? "input " : ""; +push @out, $self->msg('filter4', $flag, $sort, $fno, $call); +return (1, @out);