12135
|
1 |
use server::coretypes::{ServerVar, GameCfg, TeamInfo, HedgehogInfo};
|
|
2 |
|
|
3 |
|
|
4 |
pub enum HWProtocolMessage<'a> {
|
|
5 |
// core
|
|
6 |
Ping,
|
|
7 |
Pong,
|
|
8 |
Quit(Option<&'a str>),
|
|
9 |
//Cmd(&'a str, Vec<&'a str>),
|
|
10 |
Global(&'a str),
|
|
11 |
Watch(&'a str),
|
|
12 |
ToggleServerRegisteredOnly,
|
|
13 |
SuperPower,
|
|
14 |
Info(&'a str),
|
|
15 |
// not entered state
|
|
16 |
Nick(&'a str),
|
|
17 |
Proto(u32),
|
|
18 |
Password(&'a str, &'a str),
|
|
19 |
Checker(&'a str),
|
|
20 |
// lobby
|
|
21 |
List,
|
|
22 |
Chat(&'a str),
|
|
23 |
CreateRoom(&'a str, Option<&'a str>),
|
|
24 |
Join(&'a str, Option<&'a str>),
|
|
25 |
Follow(&'a str),
|
|
26 |
Rnd(Vec<&'a str>),
|
|
27 |
Kick(&'a str),
|
|
28 |
Ban(&'a str, &'a str, u32),
|
|
29 |
BanIP(&'a str, &'a str, u32),
|
|
30 |
BanNick(&'a str, &'a str, u32),
|
|
31 |
BanList,
|
|
32 |
Unban(&'a str),
|
|
33 |
SetServerVar(ServerVar),
|
|
34 |
GetServerVar,
|
|
35 |
RestartServer,
|
|
36 |
Stats,
|
|
37 |
// in room
|
|
38 |
Part(Option<&'a str>),
|
|
39 |
Cfg(GameCfg),
|
|
40 |
AddTeam(TeamInfo),
|
|
41 |
RemoveTeam(&'a str),
|
|
42 |
SetHedgehogsNumber(&'a str, u8),
|
|
43 |
SetTeamColor(&'a str, u8),
|
|
44 |
ToggleReady,
|
|
45 |
StartGame,
|
|
46 |
EngineMessage,
|
|
47 |
RoundFinished,
|
|
48 |
ToggleRestrictJoin,
|
|
49 |
ToggleRestrictTeams,
|
|
50 |
ToggleRegisteredOnly,
|
|
51 |
RoomName(&'a str),
|
|
52 |
Delegate(&'a str),
|
|
53 |
TeamChat(&'a str),
|
|
54 |
MaxTeams(u8),
|
|
55 |
Fix,
|
|
56 |
Unfix,
|
|
57 |
Greeting(&'a str),
|
|
58 |
CallVote(Option<(&'a str, Option<&'a str>)>),
|
|
59 |
Vote(&'a str),
|
|
60 |
ForceVote(&'a str),
|
|
61 |
Save(&'a str, &'a str),
|
|
62 |
Delete(&'a str, &'a str),
|
|
63 |
SaveRoom(&'a str),
|
|
64 |
LoadRoom(&'a str),
|
|
65 |
}
|