rust/hedgewars-server/src/server/handlers.rs
changeset 14784 8390d5e4e39c
parent 14783 b3adc030104b
child 14785 a1077e8d26f4
--- a/rust/hedgewars-server/src/server/handlers.rs	Wed Apr 10 18:12:30 2019 +0300
+++ b/rust/hedgewars-server/src/server/handlers.rs	Wed Apr 10 19:30:08 2019 +0300
@@ -23,6 +23,7 @@
 mod loggingin;
 
 use self::loggingin::LoginResult;
+use crate::protocol::messages::global_chat;
 use std::fmt::{Formatter, LowerHex};
 
 #[derive(PartialEq)]
@@ -215,6 +216,7 @@
                     HWProtocolMessage::Quit(None) => {
                         common::remove_client(server, response, "User quit".to_string());
                     }
+                    HWProtocolMessage::Global(msg) => response.add(global_chat(msg).send_all()),
                     _ => match server.clients[client_id].room_id {
                         None => lobby::handle(server, client_id, response, message),
                         Some(room_id) => {