equal
deleted
inserted
replaced
31 vec![Nick(nick).send_self().action(), |
31 vec![Nick(nick).send_self().action(), |
32 CheckRegistered] |
32 CheckRegistered] |
33 }; |
33 }; |
34 |
34 |
35 server.react(client_id, actions); |
35 server.react(client_id, actions); |
36 }, |
36 } |
37 HWProtocolMessage::Proto(proto) => { |
37 HWProtocolMessage::Proto(proto) => { |
38 let client = &mut server.clients[client_id]; |
38 let client = &mut server.clients[client_id]; |
39 let actions = if client.protocol_number != 0 { |
39 let actions = if client.protocol_number != 0 { |
40 vec![ProtocolError("Protocol already known.".to_string())] |
40 vec![ProtocolError("Protocol already known.".to_string())] |
41 } |
41 } |
46 client.protocol_number = proto; |
46 client.protocol_number = proto; |
47 vec![Proto(proto).send_self().action(), |
47 vec![Proto(proto).send_self().action(), |
48 CheckRegistered] |
48 CheckRegistered] |
49 }; |
49 }; |
50 server.react(client_id, actions); |
50 server.react(client_id, actions); |
51 }, |
51 } |
|
52 #[cfg(feature = "official-server")] |
|
53 HWProtocolMessage::Checker(protocol, nick, password) => { |
|
54 let c = &mut server.clients[client_id]; |
|
55 c.nick = nick; |
|
56 c.web_password = password; |
|
57 c.set_is_checker(true); |
|
58 } |
52 _ => warn!("Incorrect command in logging-in state"), |
59 _ => warn!("Incorrect command in logging-in state"), |
53 } |
60 } |
54 } |
61 } |