mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +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];
|
RoomState state = RoomState.values()[this.packet.readInt() % RoomState.values().length];
|
||||||
|
|
||||||
String password = this.packet.readString();
|
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, ""));
|
this.client.sendResponse(new RoomEditSettingsErrorComposer(room.getId(), RoomEditSettingsErrorComposer.PASSWORD_REQUIRED, ""));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ public class RoomSettingsSaveEvent extends MessageHandler {
|
|||||||
room.setName(name);
|
room.setName(name);
|
||||||
room.setDescription(description);
|
room.setDescription(description);
|
||||||
room.setState(state);
|
room.setState(state);
|
||||||
room.setPassword(password);
|
if (!password.isEmpty()) room.setPassword(password);
|
||||||
room.setUsersMax(usersMax);
|
room.setUsersMax(usersMax);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user