--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gameServer2/src/protocol/messages.rs Thu Jan 05 19:07:01 2017 +0300
@@ -0,0 +1,65 @@
+use server::coretypes::{ServerVar, GameCfg, TeamInfo, HedgehogInfo};
+
+
+pub enum HWProtocolMessage<'a> {
+ // core
+ Ping,
+ Pong,
+ Quit(Option<&'a str>),
+ //Cmd(&'a str, Vec<&'a str>),
+ Global(&'a str),
+ Watch(&'a str),
+ ToggleServerRegisteredOnly,
+ SuperPower,
+ Info(&'a str),
+ // not entered state
+ Nick(&'a str),
+ Proto(u32),
+ Password(&'a str, &'a str),
+ Checker(&'a str),
+ // lobby
+ List,
+ Chat(&'a str),
+ CreateRoom(&'a str, Option<&'a str>),
+ Join(&'a str, Option<&'a str>),
+ Follow(&'a str),
+ Rnd(Vec<&'a str>),
+ Kick(&'a str),
+ Ban(&'a str, &'a str, u32),
+ BanIP(&'a str, &'a str, u32),
+ BanNick(&'a str, &'a str, u32),
+ BanList,
+ Unban(&'a str),
+ SetServerVar(ServerVar),
+ GetServerVar,
+ RestartServer,
+ Stats,
+ // in room
+ Part(Option<&'a str>),
+ Cfg(GameCfg),
+ AddTeam(TeamInfo),
+ RemoveTeam(&'a str),
+ SetHedgehogsNumber(&'a str, u8),
+ SetTeamColor(&'a str, u8),
+ ToggleReady,
+ StartGame,
+ EngineMessage,
+ RoundFinished,
+ ToggleRestrictJoin,
+ ToggleRestrictTeams,
+ ToggleRegisteredOnly,
+ RoomName(&'a str),
+ Delegate(&'a str),
+ TeamChat(&'a str),
+ MaxTeams(u8),
+ Fix,
+ Unfix,
+ Greeting(&'a str),
+ CallVote(Option<(&'a str, Option<&'a str>)>),
+ Vote(&'a str),
+ ForceVote(&'a str),
+ Save(&'a str, &'a str),
+ Delete(&'a str, &'a str),
+ SaveRoom(&'a str),
+ LoadRoom(&'a str),
+}