rust/hedgewars-server/src/handlers.rs
changeset 15522 4a0b06b03199
parent 15520 fd3a20e9d095
child 15523 f4f6060b536c
equal deleted inserted replaced
15521:1fcce8feace4 15522:4a0b06b03199
   460         }
   460         }
   461         IoResult::SaveRoom(_, false) => {
   461         IoResult::SaveRoom(_, false) => {
   462             response.warn(ROOM_CONFIG_SAVE_FAILED);
   462             response.warn(ROOM_CONFIG_SAVE_FAILED);
   463         }
   463         }
   464         IoResult::LoadRoom(room_id, Some(contents)) => {
   464         IoResult::LoadRoom(room_id, Some(contents)) => {
   465             if let Some(ref mut room) = state.server.rooms.get_mut(room_id) {
   465             if let Some(ref mut room) = state.server.get_room_mut(room_id) {
   466                 match room.set_saves(&contents) {
   466                 match room.set_saves(&contents) {
   467                     Ok(_) => response.add(server_chat(ROOM_CONFIG_LOADED.to_string()).send_self()),
   467                     Ok(_) => response.add(server_chat(ROOM_CONFIG_LOADED.to_string()).send_self()),
   468                     Err(e) => {
   468                     Err(e) => {
   469                         warn!("Error while deserializing the room configs: {}", e);
   469                         warn!("Error while deserializing the room configs: {}", e);
   470                         response.warn(ROOM_CONFIG_DESERIALIZE_FAILED);
   470                         response.warn(ROOM_CONFIG_DESERIALIZE_FAILED);