From 3ec3a6aca6bfedd247f9bf52c00abd15f7ead5df Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Mon, 27 May 2019 22:32:47 +0300 Subject: [PATCH] Save room settings with password-locked rooms --- .../habbo/messages/incoming/rooms/RoomSettingsSaveEvent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/RoomSettingsSaveEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/RoomSettingsSaveEvent.java index 4adf71b4..db338bf2 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/RoomSettingsSaveEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/RoomSettingsSaveEvent.java @@ -38,7 +38,7 @@ public class RoomSettingsSaveEvent extends MessageHandler { RoomState state = RoomState.values()[this.packet.readInt() % RoomState.values().length]; String password = this.packet.readString(); - if (state == RoomState.PASSWORD && password.isEmpty()) { + if (state == RoomState.PASSWORD && password.isEmpty() && (room.getPassword() == null || room.getPassword().isEmpty())) { this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.PASSWORD_REQUIRED, "")); return; } @@ -75,7 +75,7 @@ public class RoomSettingsSaveEvent extends MessageHandler { room.setName(name); room.setDescription(description); room.setState(state); - room.setPassword(password); + if (!password.isEmpty()) room.setPassword(password); room.setUsersMax(usersMax);