X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=dbcd8097bafce544231a37f7e58565f55999e3c3;hb=42846321acd959aa93c2c2afd2b1f0a67f8accaf;hp=118feef49dba1bf420ca2172dfb6aa990ed975fc;hpb=6ca67477693e7f808e972df82b860398ee8706df;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 118feef4..dbcd8097 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -1182,6 +1182,32 @@ sub forward_it return 0; } +# +# look down the forward table to see whether this is a valid bull +# or not (ie it will forward somewhere even if it is only here) +# +sub valid_bull_addr +{ + my $call = shift; + my $i; + + unless (@forward) { + return 1 if $call =~ /^ALL/; + return 1 if $call =~ /^DX/; + return 0; + } + + for ($i = 0; $i < @forward; $i += 5) { + my ($sort, $field, $pattern, $action, $bbs) = @forward[$i..($i+4)]; + if ($field eq 'T') { + if (!$pattern || $call =~ m{$pattern}i) { + return 1; + } + } + } + return 0; +} + sub dump_it { my $ref = shift;