]> dxcluster.net Git - spider.git/commitdiff
add missing clear/route command
authorminima <minima>
Wed, 13 Jun 2001 15:28:41 +0000 (15:28 +0000)
committerminima <minima>
Wed, 13 Jun 2001 15:28:41 +0000 (15:28 +0000)
Changes
cmd/clear/route.pl [new file with mode: 0644]

diff --git a/Changes b/Changes
index d359471a5f0a0835f2697a508b4d6c04dcad6235..a62ab090b21800ff5cdf0a80cf6019b7dbf2f18f 100644 (file)
--- 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 (file)
index 0000000..9cc3705
--- /dev/null
@@ -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);