X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fsend.pl;h=2ebca2a93f9a5aaeb7816360d3aa955382ab80d3;hb=15424b325766c68bc04207c71dbaf86f06ca5ffa;hp=9717c3afa3e4b578cc8bbde8858f17cb28edf812;hpb=abab69b2a9860c96d8ef5a958056f239d8a18e98;p=spider.git diff --git a/cmd/send.pl b/cmd/send.pl index 9717c3af..2ebca2a9 100644 --- a/cmd/send.pl +++ b/cmd/send.pl @@ -102,8 +102,22 @@ if ($self->state eq "prompt") { } # now save all the 'to' callsigns for later - my @to = map {uc $_} @f[ $i..$#f ]; - $loc->{to} = \@to; + # first check the 'to' addresses for 'badness' + my $t; + my @to; + foreach $t (@f[ $i..$#f ]) { + $t = uc $t; + if (grep $_ eq $t, @DXMsg::badmsg) { + push @out, "Sorry, $t is an unacceptable TO address"; + } else { + push @to, $t; + } + } + if (@to) { + $loc->{to} = \@to; + } else { + return (1, @out); + } # find me and set the state and the function on my state variable to # keep calling me for every line until I relinquish control