rust/hedgewars-server/src/server/handlers.rs
changeset 14715 25c564f77b7d
parent 14714 6a2e13e36b7f
child 14717 8a45c90f4580
--- a/rust/hedgewars-server/src/server/handlers.rs	Thu Feb 07 17:02:24 2019 +0300
+++ b/rust/hedgewars-server/src/server/handlers.rs	Thu Feb 07 17:17:42 2019 +0300
@@ -1,7 +1,11 @@
 use mio;
 use std::{io, io::Write};
 
-use super::{actions::Destination, core::HWServer, coretypes::ClientId};
+use super::{
+    actions::{Destination, DestinationRoom},
+    core::HWServer,
+    coretypes::ClientId,
+};
 use crate::{
     protocol::messages::{HWProtocolMessage, HWServerMessage, HWServerMessage::*},
     server::actions::PendingMessage,
@@ -81,7 +85,12 @@
         Destination::ToSelf => vec![client_id],
         Destination::ToId(id) => vec![id],
         Destination::ToAll {
-            room_id: Some(id), ..
+            room_id: DestinationRoom::Lobby,
+            ..
+        } => server.lobby_clients(),
+        Destination::ToAll {
+            room_id: DestinationRoom::Room(id),
+            ..
         } => server.room_clients(id),
         Destination::ToAll {
             protocol: Some(proto),