From: minima Date: Sun, 2 Dec 2001 17:06:37 +0000 (+0000) Subject: fix spurious 'new message' message for unread deleted personals X-Git-Tag: R_1_50~159 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c89d8b54e6b38a0dfd1eb2674d2a3327919883b;p=spider.git fix spurious 'new message' message for unread deleted personals ignore remote passive link PC19s --- diff --git a/Changes b/Changes index 986b2d04..f15cb3c1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +02Dec01======================================================================= +1. Fix spurious 'new message for you' messages if things are deleted but +unread. +2. stop remote passive nodes (those with version numbers of 0000) from +poluting the nodes table. Maybe this will make things slightly more stable. 26Nov01======================================================================= 1. Make changes to the installation manual to show making the client before actually trying to use it! Thanks to oz1lqh. Also add a line for SuSE diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 598dc7ea..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 diff --git a/perl/DXProt.pm b/perl/DXProt.pm index ee9c92f1..7a39bb3a 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -208,7 +208,7 @@ sub new # add this node to the table, the values get filled in later my $pkg = shift; my $call = shift; - $main::routeroot->add($call, '0000', Route::here(1)) if $call ne $main::mycall; + $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall; return $self; } @@ -743,7 +743,7 @@ sub normal eph_del_regex("^PC(?:21\^$call|17\^[^\^]+\^$call)"); # check for sane parameters - $ver = 5000 if $ver eq '0000'; +# $ver = 5000 if $ver eq '0000'; next if $ver < 5000; # only works with version 5 software next if length $call < 3; # min 3 letter callsigns next if $call eq $main::mycall;