use strict;
-use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime $lru $lrusize $tooold $v3 $noips);
+use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime $lru $lrusize $tooold $v3);
%u = ();
$dbm = undef;
$lrusize = 2000;
$tooold = 86400 * 365; # this marks an old user who hasn't given enough info to be useful
$v3 = 0;
-$noips = 4;
# hash of valid elements and a simple prompt
%valid = (
believe => '1,Believable nodes,parray',
lastping => '1,Last Ping at,ptimelist',
maxconnect => '1,Max Connections',
- ip => '1,IP addresses,piplist',
);
#no strict;
unlink "$main::local_data/users.v3";
}
-# IP address handling
-# this allows one to ask whether an IP address has been used with this node or let's one set an IP address for this node.
-sub ip
-{
- my $self = shift;
- my $node = shift;
- my $ipin = shift;
-
- $self->{ip} = {} unless ref $self->{ip};
- my $ref = $self->{ip};
- delete $ref->{''};
- $ref->{$node} = [$ipin, $main::systime] if $ipin;
- return $ref->{$node}->[0];
-}
-
#
# periodic processing
#