X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fsend.pl;h=b728d38791fd886ea6acdad5754141019bcbb96e;hb=42846321acd959aa93c2c2afd2b1f0a67f8accaf;hp=9cee791550ca4aa94e4d77d69bcab18cc26a7bd3;hpb=6ca67477693e7f808e972df82b860398ee8706df;p=spider.git diff --git a/cmd/send.pl b/cmd/send.pl index 9cee7915..b728d387 100644 --- a/cmd/send.pl +++ b/cmd/send.pl @@ -32,8 +32,9 @@ $loc->{rrreq} = '0'; if ($self->state eq "prompt") { - my @f = split /([\s\@\$])/, $line; + my @f = split /([\s\@\$,])/, $line; @f = map {s/\s+//g; length $_ ? $_ : ()} @f; + @f = grep {$_ ne ','} @f; # any thing after send? return (1, $self->msg('e6')) if !@f; @@ -109,6 +110,8 @@ if ($self->state eq "prompt") { # callsign ? $notincalls = 0; +# $DB::single = 1; + # is this callsign a distro? my $fn = "/spider/msg/distro/$f.pl"; if (-e $fn) { @@ -127,10 +130,14 @@ if ($self->state eq "prompt") { } } - if (grep $_ eq $f, @DXMsg::badmsg) { - push @out, $self->msg('m3', $f); + if (($loc->{private} && is_callsign($f)) || (!$loc->{private} && DXMsg::valid_bull_addr($f))) { + if (grep $_ eq $f, @DXMsg::badmsg) { + push @out, $self->msg('m3', $f); + } else { + push @to, $f; + } } else { - push @to, $f; + push @out, $self->msg('m3', $f); } } } @@ -140,7 +147,7 @@ if ($self->state eq "prompt") { $loc->{to} = \@to; } else { delete $self->{loc}; - return (1, $self->msg('e6')); + return (1, @out, $self->msg('e6')); } $loc->{from} ||= $self->call; unless (is_callsign($loc->{from})) {