mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Remove duplicate code, simplify logic
This commit is contained in:
parent
caf0bcb41f
commit
dd98c3072a
@ -1202,27 +1202,20 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
{
|
||||
habbo.getHabboStats().chatCounter--;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (habbo.getHabboStats().chatCounter > 3) {
|
||||
final boolean floodRights = Emulator.getConfig().getBoolean("flood.with.rights");
|
||||
final boolean hasRights = this.hasRights(habbo);
|
||||
|
||||
if (floodRights || !hasRights) {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user