From 8088af95d9e25fd4d84a9e54c370f79bfc52a40f Mon Sep 17 00:00:00 2001 From: Llm Dl Date: Fri, 20 Nov 2020 19:24:47 -0600 Subject: [PATCH] - Fix spam countdown resetting if you speak too early. --- resources/changelog.txt | 3 ++- src/com/palmergames/bukkit/TownyChat/channels/Channel.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/changelog.txt b/resources/changelog.txt index 7f0cd88..5ef5fcf 100644 --- a/resources/changelog.txt +++ b/resources/changelog.txt @@ -347,4 +347,5 @@ v0.82: - Fix Towny not being in the depend list (instead of the softdepend list.) - Should solve load order issues. v0.83: - - Fix townychat.spam.bypass doing the opposite of its job. \ No newline at end of file + - Fix townychat.spam.bypass doing the opposite of its job. + - Fix spam countdown resetting if you speak too early. \ No newline at end of file diff --git a/src/com/palmergames/bukkit/TownyChat/channels/Channel.java b/src/com/palmergames/bukkit/TownyChat/channels/Channel.java index f898b99..aeacca2 100644 --- a/src/com/palmergames/bukkit/TownyChat/channels/Channel.java +++ b/src/com/palmergames/bukkit/TownyChat/channels/Channel.java @@ -267,9 +267,8 @@ public abstract class Channel { spam -= ((getSpam_time() + 1)*1000); } - Spammers.put(player, timeNow); - if (timeNow - spam < (getSpam_time()*1000)) { + Spammers.put(player, timeNow); TownyMessaging.sendErrorMsg(player, Translation.of("tc_err_unable_to_talk_you_are_spamming")); return true; }