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
31 $loc = $self->{loc} = {};
34 $loc->{private} = '1';
36 if ($f[0] =~ /^(B|NOP)/oi) {
37 $loc->{private} = '0';
39 } elsif ($f[0] =~ /^P/oi) {
46 if (uc $f[$i] eq 'RR') {
53 # check we have a reply number
57 $oref = DXMsg::get($f[$i]);
60 return (1, $self->msg('m4', $i));
63 if (!($oref = DXMsg::get($self->lastread))) {
65 return (1, $self->msg('m5'));
66 #return (1, "need a message number");
70 # now save all the 'to' callsigns for later
72 $loc->{to} = [ $to ]; # 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');
80 #push @out, $self->msg('sendsubj');
81 # push @out, "Reply to: $to";
82 # push @out, "Subject : $loc->{subject}";
83 # push @out, "Enter Message /EX (^Z) to send or /ABORT (^Y) to exit";
84 push @out, $self->msg('m6', $to);
85 push @out, $self->msg('m7', $loc->{subject});
86 push @out, $self->msg('m8');