X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=598dc7ea4cefd04771d0a19dc226e491c5d22fe9;hb=b735ad9a0325fae9ca0c2324794b99288a737802;hp=118feef49dba1bf420ca2172dfb6aa990ed975fc;hpb=ba0bc47c95759a369af81fb19556c48261530a79;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 118feef4..598dc7ea 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -1091,9 +1091,25 @@ sub do_send_stuff Log('msg', "line: $line"); $loc->{reject}++; } + + if ($loc->{lines} && @{$loc->{lines}}) { + push @{$loc->{lines}}, length($line) > 0 ? $line : " "; + } else { + # temporarily store any R: lines so that we end up with + # only the first and last ones stored. + if ($line =~ m|^R:\d{6}/\d{4}|) { + push @{$loc->{tempr}}, $line; + } else { + if (exists $loc->{tempr}) { + push @{$loc->{lines}}, shift @{$loc->{tempr}}; + push @{$loc->{lines}}, pop @{$loc->{tempr}} if @{$loc->{tempr}}; + delete $loc->{tempr}; + } + push @{$loc->{lines}}, length($line) > 0 ? $line : " "; + } + } # i.e. it ain't and end or abort, therefore store the line - push @{$loc->{lines}}, length($line) > 0 ? $line : " "; } } return @out; @@ -1182,6 +1198,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;