Fixed flood with rights

This commit is contained in:
Swirny 2020-05-16 05:22:22 -04:00 committed by Mike
parent 93922dcd49
commit 462592f217

View File

@ -1202,15 +1202,26 @@ public class Room implements Comparable<Room>, 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;