fixed reply so that reply b / nop send replies as bulls
[spider.git] / cmd / reply.pl
index c5ceaddf9a26c08bd746ff44f4428ebfe42fe54f..6982eb599e57993faf17a618f292388c83e4b846 100644 (file)
@@ -57,18 +57,17 @@ if ($self->state eq "prompt") {
                $oref = DXMsg::get($f[$i]);
                if (!$oref) {
                        delete $self->{loc};
-                       return (0, "can't access message $i");
+                       return (1, $self->msg('m4', $i));
                }
        } else {
                if (!($oref = DXMsg::get($self->lastread))) {
                        delete $self->{loc};
-                       #return (0, $self->msg('esend2'));
-                       return (0, "need a message number");
+                       return (1, $self->msg('m5'));
                }
        }
        
        # now save all the 'to' callsigns for later
-       my $to = $oref->from;
+       my $to = $loc->{private} ? $oref->from : $oref->to;
        $loc->{to} = [ $to ];       # to is an array
        $loc->{subject} = $oref->subject;
        $loc->{subject} = "Re: " . $loc->{subject} if !($loc->{subject} =~ /^Re:\s/io); 
@@ -77,10 +76,9 @@ if ($self->state eq "prompt") {
        # keep calling me for every line until I relinquish control
        $self->func("DXMsg::do_send_stuff");
        $self->state('sendbody');
-       #push @out, $self->msg('sendsubj');
-       push @out, "Reply to: $to";
-       push @out, "Subject : $loc->{subject}";
-       push @out, "Enter Message /EX (^Z) to send or /ABORT (^Y) to exit";
+       push @out, $self->msg('m6', $to);
+       push @out, $self->msg('m7', $loc->{subject});
+       push @out, $self->msg('m8');
 }
 
 return (1, @out);