gameServer2/src/server/server.rs
changeset 13442 c6a3784ff2c1
parent 13426 f091f69d59e4
child 13445 d3c86ade3d4d
equal deleted inserted replaced
13441:d47514fd6c6a 13442:c6a3784ff2c1
    56         key
    56         key
    57     }
    57     }
    58 
    58 
    59     pub fn handle_msg(&mut self, client_id: ClientId, msg: HWProtocolMessage) {
    59     pub fn handle_msg(&mut self, client_id: ClientId, msg: HWProtocolMessage) {
    60         debug!("Handling message {:?} for client {}", msg, client_id);
    60         debug!("Handling message {:?} for client {}", msg, client_id);
    61         handlers::handle(self, client_id, msg);
    61         if self.clients.contains(client_id) {
       
    62             handlers::handle(self, client_id, msg);
       
    63         }
    62     }
    64     }
    63 
    65 
    64     fn get_recipients(&self, client_id: ClientId, destination: Destination) -> Vec<ClientId> {
    66     fn get_recipients(&self, client_id: ClientId, destination: Destination) -> Vec<ClientId> {
    65         let mut ids = match destination {
    67         let mut ids = match destination {
    66             Destination::ToSelf => vec![client_id],
    68             Destination::ToSelf => vec![client_id],