From: djk Date: Sun, 25 Apr 1999 17:32:01 +0000 (+0000) Subject: added code to allow filtering on spot channel callsign X-Git-Tag: R_1_25~2 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=26622cd57a1f5b29f9e22092cd4149c9a1e30dc6 added code to allow filtering on spot channel callsign --- diff --git a/Changes b/Changes index cf84bb99..8c985771 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +25Apr99======================================================================= +1. Fixed problem with filtered spots not coming out. +2. Added the possibility of filtering on channel callsign 15Mar99======================================================================= 1. added $actiondata to filter line to allow per action data such as no of hops 2. fixed a silly problem in talk for non-existant callsigns diff --git a/cmd/Aliases b/cmd/Aliases index 33261a82..7d3b1300 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -88,6 +88,7 @@ package CmdAlias; '^set/nota', 'unset/talk', 'unset/talk', '^set/noww', 'unset/wwv', 'unset/wwv', '^set/nowx', 'unset/wx', 'unset/wx', + '^sh$', 'show', 'show', '^sh.*/c/n', 'show/configuration nodes', 'show/configuration', '^sh.*/c$', 'show/configuration', 'show/configuration', '^sh.*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx', diff --git a/filter/spots/GB7DJK.pl.issue b/filter/spots/GB7DJK.pl.issue index c69136cd..a1ee87bd 100644 --- a/filter/spots/GB7DJK.pl.issue +++ b/filter/spots/GB7DJK.pl.issue @@ -5,19 +5,36 @@ # US. In other filters on the UK side I do the opposite see # GB7DJK.pl.issue # -# The element list is:- -# 0 = frequency -# 1 = call -# 2 = date in unix format -# 3 = comment -# 4 = spotter -# 5 = spotted dxcc country -# 6 = spotter's dxcc country -# 7 = origin -# 8 = spotted itu -# 9 = spotted cq -# 10 = spotter's itu -# 11 = spotter's cq +# the elements of each list are +# +# [action, field_no, sort, possible_values, hops] +# +# where:- +# +# action is 1 or 0 +# +# the field list is:- +# 0 = frequency +# 1 = call +# 2 = date in unix format +# 3 = comment +# 4 = spotter +# 5 = spotted dxcc country +# 6 = spotter's dxcc country +# 7 = origin +# 8 = spotted itu +# 9 = spotted cq +# 10 = spotter's itu +# 11 = spotter's cq +# 12 = callsign of the channel on which the spot has appeared +# +# sort is +# n - numeric list of numbers e.g. [ 1,2,3 ] +# r - ranges of pairs of numbers e.g. between 2 and 4 or 10 to 17 - [ 2,4, 10,17 ] +# a - an alphanumeric regex +# d - the default rule +# +# if hops is left out or zero then the existing hop count will be used as normal # # The spot data (in this case '15') is the used as the hop count # if this is missing then the normal default applies diff --git a/filter/spots/K1XX.pl.issue b/filter/spots/K1XX.pl.issue index e116564f..cbcdd573 100644 --- a/filter/spots/K1XX.pl.issue +++ b/filter/spots/K1XX.pl.issue @@ -4,20 +4,37 @@ # I give him any spots that have a spotter or a spotted in the # US. In other filters on the UK side I do the opposite see # GB7DJK.pl.issue +## +# the elements of each list are # -# The element list is:- -# 0 = frequency -# 1 = call -# 2 = date in unix format -# 3 = comment -# 4 = spotter -# 5 = spotted dxcc country -# 6 = spotter's dxcc country -# 7 = origin -# 8 = spotted itu -# 9 = spotted cq -# 10 = spotter's itu -# 11 = spotter's cq +# [action, field_no, sort, possible_values, hops] +# +# where:- +# +# action is 1 or 0 +# +# the field list is:- +# 0 = frequency +# 1 = call +# 2 = date in unix format +# 3 = comment +# 4 = spotter +# 5 = spotted dxcc country +# 6 = spotter's dxcc country +# 7 = origin +# 8 = spotted itu +# 9 = spotted cq +# 10 = spotter's itu +# 11 = spotter's cq +# 12 = callsign of the channel on which the spot has appeared +# +# sort is +# n - numeric list of numbers e.g. [ 1,2,3 ] +# r - ranges of pairs of numbers e.g. between 2 and 4 or 10 to 17 - [ 2,4, 10,17 ] +# a - an alphanumeric regex +# d - the default rule +# +# if hops is left out or zero then the existing hop count will be used as normal # # The spot data (in this case '15') is the used as the hop count # if this is missing then the normal default applies diff --git a/perl/DXProt.pm b/perl/DXProt.pm index b1d37a9b..a6982f1f 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -238,10 +238,10 @@ sub normal foreach $dxchan (@dxchan) { next if $dxchan == $self; my $routeit; - my ($filter, $hops) = Filter::it($dxchan->{spotfilter}, @spot) if $dxchan->{spotfilter}; + my ($filter, $hops) = Filter::it($dxchan->{spotfilter}, @spot, $self->{call} ) if $dxchan->{spotfilter}; if ($hops) { - $line =~ s/\^H\d+\^\~$/\^H$hops\^\~/; $routeit = $line; + $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; } else { $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name next unless $routeit;