345 IoResult::Account(None) => { |
345 IoResult::Account(None) => { |
346 response.add(Error("Authentication failed.".to_string()).send_self()); |
346 response.add(Error("Authentication failed.".to_string()).send_self()); |
347 response.remove_client(client_id); |
347 response.remove_client(client_id); |
348 } |
348 } |
349 IoResult::Replay(Some(replay)) => { |
349 IoResult::Replay(Some(replay)) => { |
350 response.add(RoomJoined(vec![server.clients[client_id].nick.clone()]).send_self()); |
350 let protocol = server.clients[client_id].protocol_number; |
|
351 let start_msg = if protocol < 58 { |
|
352 RoomJoined(vec![server.clients[client_id].nick.clone()]) |
|
353 } else { |
|
354 ReplayStart |
|
355 }; |
|
356 response.add(start_msg.send_self()); |
|
357 |
351 common::get_room_config_impl(&replay.config, client_id, response); |
358 common::get_room_config_impl(&replay.config, client_id, response); |
352 common::get_teams(replay.teams.iter(), client_id, response); |
359 common::get_teams(replay.teams.iter(), client_id, response); |
353 response.add(RunGame.send_self()); |
360 response.add(RunGame.send_self()); |
354 response.add(ForwardEngineMessage(replay.message_log).send_self()); |
361 response.add(ForwardEngineMessage(replay.message_log).send_self()); |
355 response.add(Kicked.send_self()); |
362 |
|
363 if protocol < 58 { |
|
364 response.add(Kicked.send_self()); |
|
365 } |
356 } |
366 } |
357 IoResult::Replay(None) => { |
367 IoResult::Replay(None) => { |
358 response.add(Warning("Could't load the replay".to_string()).send_self()) |
368 response.add(Warning("Could't load the replay".to_string()).send_self()) |
359 } |
369 } |
360 IoResult::SaveRoom(_, true) => { |
370 IoResult::SaveRoom(_, true) => { |