more cosmetic changes
[spider.git] / perl / Filter.pm
index a37ea0d2d647cc95a45cdb6cdd969f8f25102e3b..82130b932041f35a8f2039fb0d433bdf7e96f29a 100644 (file)
@@ -89,7 +89,7 @@ sub compile
                if ($@) {
                        my $sort = $ref->{sort};
                        my $name = $ref->{name};
-                       dbg('err', "Error compiling $ar $sort $name: $@");
+                       dbg("Error compiling $ar $sort $name: $@");
                        Log('err', "Error compiling $ar $sort $name: $@");
                }
                $rr = $@;
@@ -107,7 +107,7 @@ sub read_in
                $in = undef; 
                my $s = readfilestr($fn);
                my $newin = eval $s;
-               dbg('conn', "$@") if $@;
+               dbg($@) if $@;
                if ($in) {
                        $newin = new('Filter::Old', $sort, $call, $flag);
                        $newin->{filter} = $in;
@@ -216,14 +216,16 @@ sub it
        }
 
        # hops are done differently (simply) 
-       my $hops = $self->{hops} if exists $self->{hops};
+       my $hops = "H$self->{hops}" if exists $self->{hops};
 
        if (isdbg('filter')) {
                my $args = join '\',\'', @_;
-               my $true = $r ? "OK" : "REJ";
+               my $true = $r ? "OK " : "REJ";
                my $sort = $self->{sort};
-               $hops ||= "none";
-               dbg('filter', "Filter: $type/$sort with $asc on '$args': $true hops: $hops");
+               my $dir = $self->{name} =~ /^in_/i ? "IN " : "OUT";
+               
+               $hops ||= "H?";
+               dbg("$true $dir: $type/$sort with $asc on '$args' $hops") if isdbg('filter');
        }
        return ($r, $hops);
 }