--- a/rust/hedgewars-server/src/handlers.rs Wed Mar 27 02:19:44 2024 +0300
+++ b/rust/hedgewars-server/src/handlers.rs Wed Mar 27 02:57:44 2024 +0300
@@ -15,7 +15,7 @@
core::{
anteroom::HwAnteroom,
room::RoomSave,
- server::HwServer,
+ server::{HwRoomOrServer, HwServer},
types::{ClientId, Replay, RoomId},
},
utils,
@@ -372,8 +372,10 @@
}
}
_ => match state.server.get_room_control(client_id) {
- None => inlobby::handle(&mut state.server, client_id, response, message),
- Some(control) => inroom::handle(control, response, message),
+ HwRoomOrServer::Room(control) => inroom::handle(control, response, message),
+ HwRoomOrServer::Server(server) => {
+ inlobby::handle(server, client_id, response, message)
+ }
},
}
}