X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRoute%2FNode.pm;h=1fbd8f71a291a1cddab0b6c71430bea16c1610cb;hb=abe7df695ac8666bf0d00c38f43bf68b76a00c31;hp=e7a6f8e4e1c352bbdb563d10bd05a21a59c851dd;hpb=9a61ef555083e7288a41de95d3709454c0a20625;p=spider.git diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index e7a6f8e4..1fbd8f71 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -16,7 +16,7 @@ use strict; use vars qw($VERSION $BRANCH); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); $main::build += $VERSION; $main::branch += $BRANCH; @@ -29,8 +29,8 @@ use vars qw(%list %valid @ISA $max $filterdef); users => '0,Users,parray', usercount => '0,User Count', version => '0,Version', - pc90 => '0,Using PC90,yesno', - lastpc90 => '0,Last PC90 time,cldatetime', + np => '0,Using New Prot,yesno', + lid => '0,Last Msgid', ); $filterdef = $Route::filterdef; @@ -224,6 +224,7 @@ sub new $self->{flags} = shift; $self->{users} = []; $self->{nodes} = []; + $self->{lid} = 0; $list{$call} = $self; @@ -244,6 +245,22 @@ sub get_all return values %list; } +sub newid +{ + my $self = shift; + my $id = shift; + + return 0 if $id == $self->{lid}; + if ($id > $self->{lid}) { + $self->{lid} = $id; + return 1; + } elsif ($self->{lid} - $id > 60000) { + $self->{id} = $id; + return 1; + } + return 0; +} + sub _addparent { my $self = shift;