From 462592f2171b231c172bf00abd300499e3c67df9 Mon Sep 17 00:00:00 2001 From: Swirny <140-Swirny@users.noreply.git.krews.org> Date: Sat, 16 May 2020 05:22:22 -0400 Subject: [PATCH] Fixed flood with rights --- .../com/eu/habbo/habbohotel/rooms/Room.java | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index 483744f3..dc3af8b5 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -1202,15 +1202,26 @@ public class Room implements Comparable, ISerialize, Runnable { { habbo.getHabboStats().chatCounter--; - if (habbo.getHabboStats().chatCounter > 3 && !this.hasRights(habbo)) { - if (this.chatProtection == 0) { - this.floodMuteHabbo(habbo, 30); - } else if (this.chatProtection == 1 && habbo.getHabboStats().chatCounter > 4) { - this.floodMuteHabbo(habbo, 30); - } else if (this.chatProtection == 2 && habbo.getHabboStats().chatCounter > 5) { - this.floodMuteHabbo(habbo, 30); + if (Emulator.getConfig().getBoolean("flood.with.rights")) { + if (habbo.getHabboStats().chatCounter > 3 && !this.hasRights(habbo)) { + if (this.chatProtection == 0) { + this.floodMuteHabbo(habbo, 30); + } else if (this.chatProtection == 1 && habbo.getHabboStats().chatCounter > 4) { + this.floodMuteHabbo(habbo, 30); + } else if (this.chatProtection == 2 && habbo.getHabboStats().chatCounter > 5) { + this.floodMuteHabbo(habbo, 30); + } } } + else if (habbo.getHabboStats().chatCounter > 3 && this.hasRights(habbo)) { + if (this.chatProtection == 0) { + this.floodMuteHabbo(habbo, 30); + } else if (this.chatProtection == 1 && habbo.getHabboStats().chatCounter > 4) { + this.floodMuteHabbo(habbo, 30); + } else if (this.chatProtection == 2 && habbo.getHabboStats().chatCounter > 5) { + this.floodMuteHabbo(habbo, 30); + } + } } else { habbo.getHabboStats().chatCounter = 0;