mirror of
https://github.com/yacy/yacy_search_server.git
synced 2025-07-22 09:14:38 -04:00
*) Bugfix for userDB time limit calculation
See: http://www.yacy-forum.de/viewtopic.php?p=10949 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@898 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
@ -57,14 +57,14 @@ import de.anomic.kelondro.kelondroException;
|
||||
import de.anomic.kelondro.kelondroMap;
|
||||
import de.anomic.server.logging.serverLog;
|
||||
|
||||
public class userDB {
|
||||
public final class userDB {
|
||||
|
||||
public static final int USERNAME_MAX_LENGTH = 128;
|
||||
public static final int USERNAME_MIN_LENGTH = 4;
|
||||
|
||||
kelondroMap userTable;
|
||||
private File userTableFile;
|
||||
private int bufferkb;
|
||||
private final File userTableFile;
|
||||
private final int bufferkb;
|
||||
|
||||
public userDB(File userTableFile, int bufferkb) throws IOException {
|
||||
this.userTableFile = userTableFile;
|
||||
@ -248,7 +248,7 @@ public class userDB {
|
||||
long newTimeUsed = oldTimeUsed;
|
||||
|
||||
if (decrementTimeUsed) {
|
||||
if ((lastAccess == null)||((lastAccess != null)||(lastAccess.longValue()-timeStamp>1000))) {
|
||||
if ((lastAccess == null)||((lastAccess != null)&&(timeStamp-lastAccess.longValue()>=1000*60))) {
|
||||
this.mem.put(TIME_USED,Long.toString(newTimeUsed = ++oldTimeUsed));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user