equal
deleted
inserted
replaced
15 }; |
15 }; |
16 use super::{ |
16 use super::{ |
17 messages::{HWProtocolMessage, HWProtocolMessage::*}, |
17 messages::{HWProtocolMessage, HWProtocolMessage::*}, |
18 test::gen_proto_msg |
18 test::gen_proto_msg |
19 }; |
19 }; |
20 use server::coretypes::{ |
20 use crate::server::coretypes::{ |
21 HedgehogInfo, TeamInfo, GameCfg, VoteType |
21 HedgehogInfo, TeamInfo, GameCfg, VoteType |
22 }; |
22 }; |
23 |
23 |
24 named!(end_of_message, tag!("\n\n")); |
24 named!(end_of_message, tag!("\n\n")); |
25 named!(str_line<&[u8], &str>, map_res!(not_line_ending, str::from_utf8)); |
25 named!(str_line<&[u8], &str>, map_res!(not_line_ending, str::from_utf8)); |
68 | do_parse!(tag!("LIST") >> (List)) |
68 | do_parse!(tag!("LIST") >> (List)) |
69 | do_parse!(tag!("BANLIST") >> (BanList)) |
69 | do_parse!(tag!("BANLIST") >> (BanList)) |
70 | do_parse!(tag!("GET_SERVER_VAR") >> (GetServerVar)) |
70 | do_parse!(tag!("GET_SERVER_VAR") >> (GetServerVar)) |
71 | do_parse!(tag!("TOGGLE_READY") >> (ToggleReady)) |
71 | do_parse!(tag!("TOGGLE_READY") >> (ToggleReady)) |
72 | do_parse!(tag!("START_GAME") >> (StartGame)) |
72 | do_parse!(tag!("START_GAME") >> (StartGame)) |
73 | do_parse!(tag!("ROUNDFINISHED") >> m: opt_param >> (RoundFinished)) |
73 | do_parse!(tag!("ROUNDFINISHED") >> _m: opt_param >> (RoundFinished)) |
74 | do_parse!(tag!("TOGGLE_RESTRICT_JOINS") >> (ToggleRestrictJoin)) |
74 | do_parse!(tag!("TOGGLE_RESTRICT_JOINS") >> (ToggleRestrictJoin)) |
75 | do_parse!(tag!("TOGGLE_RESTRICT_TEAMS") >> (ToggleRestrictTeams)) |
75 | do_parse!(tag!("TOGGLE_RESTRICT_TEAMS") >> (ToggleRestrictTeams)) |
76 | do_parse!(tag!("TOGGLE_REGISTERED_ONLY") >> (ToggleRegisteredOnly)) |
76 | do_parse!(tag!("TOGGLE_REGISTERED_ONLY") >> (ToggleRegisteredOnly)) |
77 )); |
77 )); |
78 |
78 |