gameServer2/src/server/handlers/inroom.rs
changeset 13445 d3c86ade3d4d
parent 13444 914f9b970f4d
child 13477 f748a72432f2
equal deleted inserted replaced
13444:914f9b970f4d 13445:d3c86ade3d4d
    11     actions::{Action, Action::*}
    11     actions::{Action, Action::*}
    12 };
    12 };
    13 use utils::is_name_illegal;
    13 use utils::is_name_illegal;
    14 use std::mem::swap;
    14 use std::mem::swap;
    15 use base64::{encode, decode};
    15 use base64::{encode, decode};
    16 use super::common::rnd_reply;
    16 use super::common::rnd_action;
    17 
    17 
    18 #[derive(Clone)]
    18 #[derive(Clone)]
    19 struct ByMsg<'a> {
    19 struct ByMsg<'a> {
    20     messages: &'a[u8]
    20     messages: &'a[u8]
    21 }
    21 }
   287                     }
   287                     }
   288                 }
   288                 }
   289             }
   289             }
   290             server.react(client_id, actions)
   290             server.react(client_id, actions)
   291         },
   291         },
   292         Rnd(v) => server.react(client_id, rnd_reply(v)),
   292         Rnd(v) => {
       
   293             let actions = rnd_action(v, server.room(client_id));
       
   294             server.react(client_id, actions)
       
   295         },
   293         _ => warn!("Unimplemented!")
   296         _ => warn!("Unimplemented!")
   294     }
   297     }
   295 }
   298 }