From 1ec7f997cf418ebf99018b8e3efa2af210cd2e09 Mon Sep 17 00:00:00 2001 From: asofold Date: Wed, 13 Mar 2013 06:20:14 +0100 Subject: [PATCH] Just add to first bucket, since update(...) has been called. --- .../java/fr/neatmonster/nocheatplus/checks/chat/Logins.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Logins.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Logins.java index 2777b4d6..cb42010f 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Logins.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Logins.java @@ -14,7 +14,7 @@ import fr.neatmonster.nocheatplus.utilities.TickTask; public class Logins extends Check implements IRemoveData{ - /** Per world count (only used if set in config). */ + /** Per world count (if set in the config, only "" is used). */ private final Map counts = new HashMap(); public Logins() { @@ -38,12 +38,12 @@ public class Logins extends Check implements IRemoveData{ final ActionFrequency freq = getActionFrequency(player.getWorld().getName(), 6, durBucket, cc.loginsPerWorldCount); freq.update(now); final boolean cancel = freq.score(1f) > cc.loginsLimit; // TODO: >= ... This will be 1 after the first login (!). - if (!cancel) freq.add(now, 1f); + if (!cancel) freq.add(1f); return cancel; } /** - * Called by ChatL1.istener + * Called by ChatListener */ public void onReload() { counts.clear();