rust/hedgewars-server/src/protocol/messages.rs
changeset 14835 57ed3981db20
parent 14795 add191d825f4
child 14907 c156273b57de
equal deleted inserted replaced
14834:cbc1216fdf39 14835:57ed3981db20
   107     ProtocolFlags::format('-', flags)
   107     ProtocolFlags::format('-', flags)
   108 }
   108 }
   109 
   109 
   110 #[derive(Debug)]
   110 #[derive(Debug)]
   111 pub enum HWServerMessage {
   111 pub enum HWServerMessage {
       
   112     Connected(u32),
       
   113     Redirect(u16),
       
   114 
   112     Ping,
   115     Ping,
   113     Pong,
   116     Pong,
   114     Bye(String),
   117     Bye(String),
   115 
   118 
   116     Nick(String),
   119     Nick(String),
   144     ServerMessage(String),
   147     ServerMessage(String),
   145     ServerVars(Vec<String>),
   148     ServerVars(Vec<String>),
   146     Notice(String),
   149     Notice(String),
   147     Warning(String),
   150     Warning(String),
   148     Error(String),
   151     Error(String),
   149     Connected(u32),
       
   150     Unreachable,
   152     Unreachable,
   151 
   153 
   152     //Deprecated messages
   154     //Deprecated messages
   153     LegacyReady(bool, Vec<String>),
   155     LegacyReady(bool, Vec<String>),
   154 }
   156 }
   360             Connected(protocol_version) => msg![
   362             Connected(protocol_version) => msg![
   361                 "CONNECTED",
   363                 "CONNECTED",
   362                 "Hedgewars server https://www.hedgewars.org/",
   364                 "Hedgewars server https://www.hedgewars.org/",
   363                 protocol_version
   365                 protocol_version
   364             ],
   366             ],
       
   367             Redirect(port) => msg!["REDIRECT", port],
   365             Bye(msg) => msg!["BYE", msg],
   368             Bye(msg) => msg!["BYE", msg],
   366             Nick(nick) => msg!["NICK", nick],
   369             Nick(nick) => msg!["NICK", nick],
   367             Proto(proto) => msg!["PROTO", proto],
   370             Proto(proto) => msg!["PROTO", proto],
   368             AskPassword(salt) => msg!["ASKPASSWORD", salt],
   371             AskPassword(salt) => msg!["ASKPASSWORD", salt],
   369             ServerAuth(hash) => msg!["SERVER_AUTH", hash],
   372             ServerAuth(hash) => msg!["SERVER_AUTH", hash],