mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Merge branch 'mute-time-config' into 'dev'
Make flood time configurable See merge request morningstar/Arcturus-Community!241
This commit is contained in:
commit
38cf88aeac
@ -25,3 +25,6 @@ ALTER TABLE `users_settings` ADD `tradelock_amount` INT(11) NOT NULL DEFAULT '0'
|
|||||||
-- Gift wrapping configuration
|
-- Gift wrapping configuration
|
||||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.box_types', '0,1,2,3,4,5,6,8');
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.box_types', '0,1,2,3,4,5,6,8');
|
||||||
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.ribbon_types', '0,1,2,3,4,5,6,7,8,9,10');
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.ribbon_types', '0,1,2,3,4,5,6,7,8,9,10');
|
||||||
|
|
||||||
|
-- Configurable mute time
|
||||||
|
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.flood.mute.time', '30');
|
@ -204,6 +204,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
private int idleCycles;
|
private int idleCycles;
|
||||||
private volatile int unitCounter;
|
private volatile int unitCounter;
|
||||||
private volatile int rollerSpeed;
|
private volatile int rollerSpeed;
|
||||||
|
private int muteTime = Emulator.getConfig().getInt("hotel.flood.mute.time");
|
||||||
private long rollerCycle = System.currentTimeMillis();
|
private long rollerCycle = System.currentTimeMillis();
|
||||||
private volatile int lastTimerReset = Emulator.getIntUnixTimestamp();
|
private volatile int lastTimerReset = Emulator.getIntUnixTimestamp();
|
||||||
private volatile boolean muted;
|
private volatile boolean muted;
|
||||||
@ -1209,11 +1210,11 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
if (floodRights || !hasRights) {
|
if (floodRights || !hasRights) {
|
||||||
if (this.chatProtection == 0) {
|
if (this.chatProtection == 0) {
|
||||||
this.floodMuteHabbo(habbo, 30);
|
this.floodMuteHabbo(habbo, muteTime);
|
||||||
} else if (this.chatProtection == 1 && habbo.getHabboStats().chatCounter > 4) {
|
} else if (this.chatProtection == 1 && habbo.getHabboStats().chatCounter > 4) {
|
||||||
this.floodMuteHabbo(habbo, 30);
|
this.floodMuteHabbo(habbo, muteTime);
|
||||||
} else if (this.chatProtection == 2 && habbo.getHabboStats().chatCounter > 5) {
|
} else if (this.chatProtection == 2 && habbo.getHabboStats().chatCounter > 5) {
|
||||||
this.floodMuteHabbo(habbo, 30);
|
this.floodMuteHabbo(habbo, muteTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user