X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXMsg.pm;h=d5a168e7ced7e20120d5e44af2493fdfcf07b1ce;hb=eb944656dcd2b715338ea025fbad11e918506e26;hp=cd3bf74b0f757922abcb78545cd274899d31aa41;hpb=b672afe940f843351af2bc4a87b4c4239f3a5140;p=spider.git diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index cd3bf74b..d5a168e7 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -788,14 +788,15 @@ sub for_me { my $call = uc shift; my $ref; + my $count; foreach $ref (@msg) { # is it for me, private and unread? if ($ref->{to} eq $call && $ref->{private}) { - return 1 if !$ref->{'read'}; + $count++ unless $ref->{'read'} || $ref->{delete}; } } - return 0; + return $count; } # start the message off on its travels with a PC28 @@ -1092,7 +1093,7 @@ sub do_send_stuff $loc->{reject}++; } - if (@{$loc->{lines}}) { + if ($loc->{lines} && @{$loc->{lines}}) { push @{$loc->{lines}}, length($line) > 0 ? $line : " "; } else { # temporarily store any R: lines so that we end up with