deploy a default input route if none present.
[spider.git] / perl / DXProt.pm
index 0cf46bb9ce3a2f425f67cca568ae0131778eb464..96a51f5dce89703f306e16f7240f54a01359462d 100644 (file)
@@ -294,6 +294,12 @@ sub start
        $self->{inwcyfilter} = Filter::read_in('wcy', $call, 1) || Filter::read_in('wcy', 'node_default', 1);
        $self->{inannfilter} = Filter::read_in('ann', $call, 1) || Filter::read_in('ann', 'node_default', 1);
        $self->{inroutefilter} = Filter::read_in('route', $call, 1) || Filter::read_in('route', 'node_default', 1) unless $self->{isolate};
+       # if there is no route input filter then specify a default one.
+       # obviously this can be changed later by the sysop.
+       if (!$self->{inroutefilter}) {
+               my $dxcc = $self->dxcc;
+               $Route::filterdef->cmd($self, 'route', 'accept', "input by_dxcc $dxcc" );
+       }
        
        # set unbuffered and no echo
        $self->send_now('B',"0");
@@ -1170,7 +1176,7 @@ sub talk
        } else {
                $self->send(pc10($from, $to, $via, $line, $origin));
        }
-       Log('talk', $to, $from, $via?$via:$self->call, $line) unless $origin && $origin ne $main::mycall;
+       Log('talk', $to, $from, '>' . ($via || $origin || $self->call), $line) unless $origin && $origin ne $main::mycall;
 }
 
 # send it if it isn't the except list and isn't isolated and still has a hop count