+09Jun01=======================================================================
+1. more fixes
+2. add set/debug filter so that you can see why your filters aren't working
+(for sysops only)
08Jun01=======================================================================
1. first cut with new routing code. Created NEW_ROUTE branch
2. added acc/route and rej/route commands
if ($clref) {
my $dxc = $clref->dxchan;
if ($dxc) {
- if (grep {my $dxc=$clref->dxchan; $dxc && $dxc == $_ } DXCommandmode::get_all()) {
+ if (!grep $dxc == $_, DXCommandmode::get_all()) {
next if $clref->call eq $main::mycall; # i.e. it lives here
- $dxchan = $clref->dxchan;
+ $dxchan = $dxc;
$ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
}
} else {
my $filter;
my @keys = sort $self->getfilkeys;
my $key;
+ my $type = 'Dunno';
+ my $asc = '?';
+
my $r = @keys > 0 ? 0 : 1;
foreach $key (@keys) {
$filter = $self->{$key};
if ($filter->{reject} && exists $filter->{reject}->{code}) {
+ $type = 'reject';
+ $asc = $filter->{reject}->{user};
if (&{$filter->{reject}->{code}}(\@_)) {
$r = 0;
last;
}
}
if ($filter->{accept} && exists $filter->{accept}->{code}) {
+ $type = 'accept';
+ $asc = $filter->{accept}->{user};
if (&{$filter->{accept}->{code}}(\@_)) {
$r = 1;
last;
# hops are done differently (simply)
my $hops = $self->{hops} if exists $self->{hops};
+ if (isdbg('filter')) {
+ my $args = join '\',\'', @_;
+ my $true = $r ? "OK" : "REJ";
+ my $sort = $self->{sort};
+ $hops ||= "none";
+ dbg('filter', "Filter: $type/$sort with $asc on '$args': $true hops: $hops");
+ }
return ($r, $hops);
}