6 # send <call> [<call> .. ]
7 # send private <call> [<call> .. ]
8 # send private rr <call> [<call> .. ]
9 # send rr <call> [<call> .. ]
10 # send noprivate <call> [<call> .. ]
11 # send b <call> [<call> .. ]
12 # send copy <call> [<call> .. ]
13 # send copy rr <call> [<call> .. ]
15 # Copyright (c) Dirk Koopman G1TLH
19 my ($self, $line) = @_;
25 if ($self->state eq "prompt") {
27 my @f = split /\s+/, $line if $line;
29 # now deal with real message inputs
30 # parse out send line for various possibilities
35 my $msgno = $self->lastread;
36 $loc->{private} = '1';
42 } elsif ($w =~ /^(B|NOP)/i) {
43 $loc->{private} = '0';
44 } elsif ($w =~ /^P/i) {
46 } elsif (uc $w eq 'RR') {
55 # check we have a reply number
58 $oref = DXMsg::get($msgno) if $msgno;
59 return (1, $self->msg('m4', $i)) unless $oref;
61 # now save all the 'to' callsigns for later
63 if ($loc->{private}) {
70 return (1, $self->msg('e28')) unless $self->isregistered || $to eq $main::myalias;
72 $loc->{to} = [ $to, @extra ]; # to is an array
73 $loc->{subject} = $oref->subject;
74 $loc->{subject} = "Re: " . $loc->{subject} if !($loc->{subject} =~ /^Re:\s/io);
76 # find me and set the state and the function on my state variable to
77 # keep calling me for every line until I relinquish control
78 $self->func("DXMsg::do_send_stuff");
79 $self->state('sendbody');
81 push @out, $self->msg('m6', join(',', $to, @extra));
82 push @out, $self->msg('m7', $loc->{subject});
83 push @out, $self->msg('m8');