mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Save room settings with password-locked rooms
This commit is contained in:
parent
860e20ce12
commit
3ec3a6aca6
@ -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);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user