X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXUser.pm;h=62f262907fc6fa0ba6a48750766d95632e555b8f;hb=331ae9a34defd23c476ceaecdf29d9f49b60faed;hp=f371161ba2a13feee8c4b96d07a3b948d4012060;hpb=db100bf2aacab3c8a6e09569b0f9a166dc4996c5;p=spider.git diff --git a/perl/DXUser.pm b/perl/DXUser.pm index f371161b..62f26290 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -75,7 +75,7 @@ $v3 = 0; pagelth => '0,Current Pagelth', pingint => '9,Node Ping interval', nopings => '9,Ping Obs Count', - wantlogininfo => '9,Login info req,yesno', + wantlogininfo => '0,Login Info Req,yesno', wantgrid => '0,Show DX Grid,yesno', wantann_talk => '0,Talklike Anns,yesno', wantpc90 => '1,Req PC90,yesno', @@ -93,6 +93,7 @@ $v3 = 0; version => '1,Version', build => '1,Build', believe => '1,Believable nodes,parray', + lastping => '1,Last Ping at,ptimelist', ); #no strict; @@ -784,7 +785,7 @@ sub set_believe my $self = shift; my $call = uc shift; $self->{believe} ||= []; - push @{$self->{believe}}, $call; + push @{$self->{believe}}, $call unless grep $_ eq $call, @{$self->{believe}}; } sub unset_believe @@ -796,6 +797,23 @@ sub unset_believe delete $self->{believe} unless @{$self->{believe}}; } } + +sub believe +{ + my $self = shift; + return exists $self->{believe} ? @{$self->{believe}} : (); +} + +sub lastping +{ + my $self = shift; + my $call = shift; + $self->{lastping} ||= {}; + $self->{lastping} = {} unless ref $self->{lastping}; + my $b = $self->{lastping}; + $b->{$call} = shift if @_; + return $b->{$call}; +} 1; __END__