From 5c96125fa684151fbae1daa2c76ca5522d0a09c0 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 13 Jun 2001 15:28:41 +0000 Subject: [PATCH] add missing clear/route command --- Changes | 1 + cmd/clear/route.pl | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 cmd/clear/route.pl 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); -- 2.43.0