This commit is contained in:
Alejandro 2019-05-16 19:46:37 +03:00
parent 9b15464fd1
commit 8d7d5264e5
2 changed files with 11 additions and 0 deletions

View File

@ -8,4 +8,7 @@ ADD COLUMN `build_hash` varchar(64) NOT NULL AFTER `version`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('scripter.modtool.tickets', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('invisible.prevent.chat', '0');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('invisible.prevent.chat.error', 'While being invisible you cannot talk.');
#END DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3

View File

@ -3711,6 +3711,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
if (!habbo.getHabboStats().allowTalk())
return;
if (habbo.getRoomUnit().isInvisible() && Emulator.getConfig().getBoolean("invisible.prevent.chat", false)) {
if (!CommandHandler.handleCommand(habbo.getClient(), roomChatMessage.getUnfilteredMessage())) {
habbo.whisper(Emulator.getTexts().getValue("invisible.prevent.chat.error"));
}
return;
}
habbo.getHabboStats().chatCounter += 2;
if (habbo.getHabboInfo().getCurrentRoom() != this)