projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added warc and contesthf to bands.pl
[spider.git]
/
perl
/
Filter.pm
diff --git
a/perl/Filter.pm
b/perl/Filter.pm
index b027041c8c664711a0faaf511259bbcb147653c8..bf7ff65c18a24c82df8eb4c45e7c7e7695b2e04d 100644
(file)
--- a/
perl/Filter.pm
+++ b/
perl/Filter.pm
@@
-36,7
+36,7
@@
use strict;
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
) || 0
;
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/
|| (0,0))
;
$main::build += $VERSION;
$main::branch += $BRANCH;
$main::build += $VERSION;
$main::branch += $BRANCH;
@@
-226,7
+226,7
@@
sub it
my $hops = $self->{hops} if exists $self->{hops};
if (isdbg('filter')) {
my $hops = $self->{hops} if exists $self->{hops};
if (isdbg('filter')) {
- my $args = join '\',\'', @_;
+ my $args = join '\',\'',
map {defined $_ ? $_ : 'undef'}
@_;
my $true = $r ? "OK " : "REJ";
my $sort = $self->{sort};
my $dir = $self->{name} =~ /^in_/i ? "IN " : "OUT";
my $true = $r ? "OK " : "REJ";
my $sort = $self->{sort};
my $dir = $self->{name} =~ /^in_/i ? "IN " : "OUT";
@@
-310,8
+310,9
@@
sub install
}
foreach $dxchan (@dxchan) {
my $n = "$in$sort" . "filter";
}
foreach $dxchan (@dxchan) {
my $n = "$in$sort" . "filter";
- my $ref = $dxchan->$n;
- if (!$ref || ($ref && uc $ref->{name} eq "$name.PL")) {
+ my $i = $in ? 'IN_' : '';
+ my $ref = $dxchan->$n();
+ if (!$ref || ($ref && uc $ref->{name} eq "$i$name.PL")) {
$dxchan->$n($remove ? undef : $self);
}
}
$dxchan->$n($remove ? undef : $self);
}
}
@@
-367,7
+368,7
@@
sub parse
my $user;
# check the line for non legal characters
my $user;
# check the line for non legal characters
- return ('ill', $dxchan->msg('e19')) if $line =~ /[^\s\w,_\-\*\/\(\)]/;
+ return ('ill', $dxchan->msg('e19')) if $line =~ /[^\s\w,_\-\*\/\(\)
!
]/;
# add some spaces for ease of parsing
$line =~ s/([\(\)])/ $1 /g;
# add some spaces for ease of parsing
$line =~ s/([\(\)])/ $1 /g;
@@
-443,12
+444,16
@@
sub parse
if ($s) {
$s .= $conj ;
if ($s) {
$s .= $conj ;
- $s .= $not;
$user .= $conj;
$user .= $conj;
- $user .= $not;
$conj = ' && ';
$conj = ' && ';
- $not = "";
}
}
+
+ if ($not) {
+ $s .= $not;
+ $user .= $not;
+ $not = '';
+ }
+
$user .= "$tok $val";
my $fref;
$user .= "$tok $val";
my $fref;