Add SQL and fix code

This commit is contained in:
Mike 2020-06-03 02:53:10 +02:00
parent 462592f217
commit caf0bcb41f
3 changed files with 11 additions and 8 deletions

View File

@ -1 +0,0 @@
ALTER TABLE `permissions` ADD `acc_hide_mail` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `acc_hide_ip`;

View File

@ -0,0 +1,3 @@
ALTER TABLE `permissions` ADD `acc_hide_mail` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `acc_hide_ip`;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('flood.with.rights', '0');

View File

@ -1214,13 +1214,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
}
}
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 (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 {