X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FFilter.pm;h=5e89b08f68fe530ff08b1fd733863a7016a7aa05;hb=1ef2fd58669de7cae92418c4591b9fce5f66bfb0;hp=fdc06d1ae87454d3f9a81772fd403c6c80e82c7e;hpb=10cd15ab627d2df5fbce79eb1388424051309f1a;p=spider.git diff --git a/perl/Filter.pm b/perl/Filter.pm index fdc06d1a..5e89b08f 100644 --- a/perl/Filter.pm +++ b/perl/Filter.pm @@ -226,7 +226,7 @@ sub it 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"; @@ -310,8 +310,9 @@ sub install } foreach $dxchan (@dxchan) { my $n = "$in$sort" . "filter"; + my $i = $in ? 'IN_' : ''; my $ref = $dxchan->$n(); - if (!$ref || ($ref && uc $ref->{name} eq "$name.PL")) { + if (!$ref || ($ref && uc $ref->{name} eq "$i$name.PL")) { $dxchan->$n($remove ? undef : $self); } } @@ -367,7 +368,7 @@ sub parse 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; @@ -443,12 +444,16 @@ sub parse if ($s) { $s .= $conj ; - $s .= $not; $user .= $conj; - $user .= $not; $conj = ' && '; - $not = ""; } + + if ($not) { + $s .= $not; + $user .= $not; + $not = ''; + } + $user .= "$tok $val"; my $fref;