From c71a54705682b0a66d6729af5f043dc2c2df276a Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 6 Nov 2001 22:42:43 +0000 Subject: [PATCH] 1. fix read so that sysop reading doesn't increment the read counter for private mail not addressed to them. --- Changes | 3 +++ cmd/read.pl | 42 ++++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Changes b/Changes index 1580cbca..7201d694 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +06Nov01======================================================================= +1. fix read so that sysop reading doesn't increment the read counter for +private mail not addressed to them. 04Nov01======================================================================= 1. Allow the user to equal the node in RSPF checks (this allows spots and stuff with the origin and spotter to be the same (although it is STRONGLY diff --git a/cmd/read.pl b/cmd/read.pl index 0056530a..9d57307f 100644 --- a/cmd/read.pl +++ b/cmd/read.pl @@ -42,28 +42,30 @@ for $msgno (@f) { push @out, @body; # mark it as read - $ref->read($ref->read() + 1); - $ref->store(\@body); # note call by reference! + unless ($ref->private && $ref->to ne $self->call) { + $ref->read($ref->read() + 1); + $ref->store(\@body); # note call by reference! - # if it had a read receipt on it generate a new message to send back to - # the sender. - if ($ref->rrreq) { - my $sub = $ref->subject; - $sub = "Re: $sub" unless $sub =~ /^\s*re:/i; - my $to = $ref->to; - my $from = $ref->from; - my $rref = DXMsg->alloc(1, $from, $main::mycall, time, - 1, $sub, $main::mycall, 0, 0 ); - my $msgno = DXMsg::next_transno("Msgno"); - $rref->msgno($msgno); - $rref->gotit( [ "$main::mycall" ] ); - $rref->store( [ "Return receipt from delivering node. Message read by $to." ] ); - DXMsg::add_dir($rref); - DXMsg::queue_msg(0); - } + # if it had a read receipt on it generate a new message to send back to + # the sender. + if ($ref->rrreq) { + my $sub = $ref->subject; + $sub = "Re: $sub" unless $sub =~ /^\s*re:/i; + my $to = $ref->to; + my $from = $ref->from; + my $rref = DXMsg->alloc(1, $from, $main::mycall, time, + 1, $sub, $main::mycall, 0, 0 ); + my $msgno = DXMsg::next_transno("Msgno"); + $rref->msgno($msgno); + $rref->gotit( [ "$main::mycall" ] ); + $rref->store( [ "Return receipt from delivering node. Message read by $to." ] ); + DXMsg::add_dir($rref); + DXMsg::queue_msg(0); + } - # remember this one as the last one read - $self->lastread($msgno); + # remember this one as the last one read + $self->lastread($msgno); + } } return (1, @out); -- 2.43.0