gameServer2/src/server/handlers/loggingin.rs
changeset 12857 bd35cb2302b3
parent 12152 03ccb89820f3
child 13124 1e39b8749072
equal deleted inserted replaced
12856:4ffab41560c5 12857:bd35cb2302b3
     4 use server::actions::Action;
     4 use server::actions::Action;
     5 use server::actions::Action::*;
     5 use server::actions::Action::*;
     6 use protocol::messages::HWProtocolMessage;
     6 use protocol::messages::HWProtocolMessage;
     7 use protocol::messages::HWServerMessage::*;
     7 use protocol::messages::HWServerMessage::*;
     8 
     8 
     9 pub fn handle(server: &mut HWServer, token: mio::Token, poll: &mio::Poll, message: HWProtocolMessage) {
     9 pub fn handle(server: &mut HWServer, token: usize, poll: &mio::Poll, message: HWProtocolMessage) {
    10     match message {
    10     match message {
    11         HWProtocolMessage::Nick(nick) =>
    11         HWProtocolMessage::Nick(nick) =>
    12             if server.clients[token].room_id == None {
    12             if server.clients[token].room_id == None {
    13                 server.react(token, poll, vec![SendMe(Nick(&nick).to_raw_protocol())]);
    13                 server.react(token, poll, vec![SendMe(Nick(&nick).to_raw_protocol())]);
    14                 server.clients[token].nick = nick;
    14                 server.clients[token].nick = nick;