equal
deleted
inserted
replaced
219 Cfg(cfg) => { |
219 Cfg(cfg) => { |
220 let actions = if let (c, Some(r)) = server.client_and_room(client_id) { |
220 let actions = if let (c, Some(r)) = server.client_and_room(client_id) { |
221 if !c.is_master { |
221 if !c.is_master { |
222 vec![ProtocolError("You're not the room master!".to_string())] |
222 vec![ProtocolError("You're not the room master!".to_string())] |
223 } else { |
223 } else { |
224 r.set_config(cfg.clone()); |
224 let v = vec![cfg.to_server_msg() |
225 vec![cfg.into_server_msg() |
225 .send_all().in_room(r.id).but_self().action()]; |
226 .send_all().in_room(r.id).but_self().action()] |
226 r.set_config(cfg); |
|
227 v |
227 } |
228 } |
228 } else { |
229 } else { |
229 Vec::new() |
230 Vec::new() |
230 }; |
231 }; |
231 server.react(client_id, actions); |
232 server.react(client_id, actions); |