From: djk Date: Wed, 26 Apr 2000 13:20:58 +0000 (+0000) Subject: added extra callsigns to the end of the reply command so that I can reply X-Git-Tag: R_1_40~18 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=d08c2c5e5f494f9fee4435070bf511884e2ab770;p=spider.git added extra callsigns to the end of the reply command so that I can reply to several people all at once --- diff --git a/Changes b/Changes index d0301f3d..5b9060d0 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,12 @@ +25Apr00======================================================================= +1. Changed reply so that you can reply to more than one address privately 31Mar00======================================================================= 1. fixed nnn-mmm in kill (erase/delete) msgs so that mmm is also deleted and not just nnn -> mmm-1. 2. Added an autosplit to message importing so that messages are split automagically into bits if the filename used in the import directory starts with "split". This will add a [1/5] type string on the the end of the subject. -3. dedupe more aggressively on the text of Spots so that only the 1st 28 chars +3. dedupe more aggressively on the text of Spots so that only the 1st 27 chars of text are considered (as opposed to the whole lot). 30Mar00======================================================================= 1. altered client.pl connect code so that it doesn't falsely recognise diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index f1272ee9..f0acc321 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -389,6 +389,12 @@ You can also use all the extra qualifiers such as RR, PRIVATE, NOPRIVATE, B that you can use with the SEND command (see SEND for further details) +You can also send a copy of this message to a number of other callsigns +(if and only if the reply is private) by adding the callsigns to the +end of the reply command you want to use e.g:- + + REPLY 2345 G1TLH G7BRN + === 0^SEND [ ...]^Send a message to one or more callsigns === 0^SEND RR ^Send a message and ask for a read receipt === 0^SEND COPY ^Send a copy of a message to someone diff --git a/cmd/reply.pl b/cmd/reply.pl index 6982eb59..54b52dba 100644 --- a/cmd/reply.pl +++ b/cmd/reply.pl @@ -31,44 +31,45 @@ if ($self->state eq "prompt") { $loc = $self->{loc} = {}; my $i = 0; + my @extra = (); + my $msgno = $self->lastread; $loc->{private} = '1'; - if ($i < @f) { - if ($f[0] =~ /^(B|NOP)/oi) { + $loc->{rrreq} = '0'; + while (@f) { + my $w = shift @f; + if ($w =~ /^\d+$/) { + $msgno = $w; + } elsif ($w =~ /^(B|NOP)/i) { $loc->{private} = '0'; - $i += 1; - } elsif ($f[0] =~ /^P/oi) { - $i += 1; - } - } - - if ($i < @f) { - $loc->{rrreq} = '0'; - if (uc $f[$i] eq 'RR') { + } elsif ($w =~ /^P/i) { + ; + } elsif (uc $w eq 'RR') { $loc->{rrreq} = '1'; - $i++; + } else { + push @extra, uc $w; } } + my $oref; # check we have a reply number # $DB::single = 1; - if ($i < @f) { - $oref = DXMsg::get($f[$i]); - if (!$oref) { - delete $self->{loc}; - return (1, $self->msg('m4', $i)); - } - } else { - if (!($oref = DXMsg::get($self->lastread))) { - delete $self->{loc}; - return (1, $self->msg('m5')); - } + $oref = DXMsg::get($msgno) if $msgno; + unless ($oref) { + delete $self->{loc}; + return (1, $self->msg('m4', $i)); } # now save all the 'to' callsigns for later - my $to = $loc->{private} ? $oref->from : $oref->to; - $loc->{to} = [ $to ]; # to is an array + my $to; + if ($loc->{private}) { + $to = $oref->from; + } else { + $to = $oref->to; + @extra = (); + } + $loc->{to} = [ $to, @extra ]; # to is an array $loc->{subject} = $oref->subject; $loc->{subject} = "Re: " . $loc->{subject} if !($loc->{subject} =~ /^Re:\s/io); @@ -76,7 +77,7 @@ 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('m6', $to); + push @out, $self->msg('m6', join(',', $to, @extra)); push @out, $self->msg('m7', $loc->{subject}); push @out, $self->msg('m8'); }