- my $oref = DXMsg::get($f[$i]);
- #return (0, $self->msg('esend1', $f[$i])) if !$oref;
- #return (0, $self->msg('esend2')) if $i+1 > @f;
- return (0, "msgno $f[$i] not found") if !$oref;
- return (0, "need a callsign") if $i+1 > @f;
-
- # separate copy to everyone listed
- for ($i++ ; $i < @f; $i++) {
- my $msgno = DXMsg::next_transno('Msgno');
- my $newsubj = "CC: " . $oref->subject;
- my $nref = DXMsg->alloc($msgno,
- uc $f[$i],
- $self->call,
- $main::systime,
- '1',
- $newsubj,
- $main::mycall,
- '0',
- $rr);
- my @list;
- my $from = $oref->from;
- my $to = $oref->to;
- my $date = cldate($oref->t);
- my $time = ztime($oref->t);
- my $buf = "Original from: $from To: $to Date: $date $time";
- push @list, $buf;
- push @list, $oref->read_msg_body();
- $nref->store(\@list);
- $nref->add_dir();
- #push @out, $self->msg('sendcc', $oref->msgno, $f[$i]);
- push @out, "copy of msg $oref->{msgno} sent to $to";
+
+ # private / noprivate / rr
+ if ($notincalls && ($f eq 'B' || $f =~ /^NOP/oi)) {
+ $loc->{private} = '0';
+ } elsif ($notincalls && ($f eq 'P' || $f =~ /^PRI/oi)) {
+ ;
+ } elsif ($notincalls && ($f eq 'RR')) {
+ $loc->{rrreq} = '1';
+ } elsif ($f eq '<' && @f) { # this is bbs syntax for from call
+ $loc->{from} = uc shift @f;
+ } elsif (($f =~ /^[\@\.\#\$]$/ || $f eq '.#') && @f) { # this is bbs syntax, for send it 'to node'
+ shift @f;
+ } elsif ($f =~ /^\$/) { # this is bbs syntax for a bid
+ next;
+ } elsif ($f =~ /^<(\S+)/) { # this is bbs syntax for from call
+ $loc->{from} = $1;
+ } elsif ($f =~ /^\$\S+/) { # this is bbs syntax for bid
+ ;
+ } else {
+
+ # callsign ?
+ $notincalls = 0;
+
+# $DB::single = 1;
+
+ # is this callsign a distro?
+ # but be careful about messages to 'sysop'
+ if ($self->priv < 5 && $f eq 'SYSOP') {
+ push @to, $main::myalias;
+ $loc->{private} = 1;
+ } else {
+ my $fn = "/spider/msg/distro/$f.pl";
+ if (-e $fn) {
+ my $fh = new IO::File $fn;
+ if ($fh) {
+ local $/ = undef;
+ my $s = <$fh>;
+ $fh->close;
+ my @call;
+ @call = eval $s;
+ return (1, "Error in Distro $f.pl:", $@) if $@;
+ if (@call > 0) {
+ push @f, @call;
+ next;
+ }
+ }
+ }
+ }
+
+ 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 @out, $self->msg('m3', $f);
+ }