mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Fixes #610 - negative flood time
This commit is contained in:
parent
c0249a39ff
commit
34e7239ac4
@ -216,7 +216,12 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.habbo.mute(Emulator.getConfig().getInt("hotel.wordfilter.automute"), false);
|
||||
int muteTime = Emulator.getConfig().getInt("hotel.wordfilter.automute");
|
||||
if (muteTime > 0) {
|
||||
this.habbo.mute(muteTime, false);
|
||||
} else {
|
||||
LOGGER.error("Invalid hotel.wordfilter.automute defined in emulator_settings ({}).", muteTime);
|
||||
}
|
||||
}
|
||||
|
||||
this.message = "";
|
||||
|
@ -384,6 +384,11 @@ public class Habbo implements Runnable {
|
||||
}
|
||||
|
||||
public void mute(int seconds, boolean isFlood) {
|
||||
if (seconds <= 0) {
|
||||
LOGGER.warn("Tried to mute user for {} seconds, which is invalid.", seconds);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.hasPermission("acc_no_mute")) {
|
||||
int remaining = this.habboStats.addMuteTime(seconds);
|
||||
this.client.sendResponse(new FloodCounterComposer(remaining));
|
||||
|
Loading…
Reference in New Issue
Block a user