1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use specs::DenseVecStorage;

impl_try_from_enum!{

/// All error codes that can be sent to the client.
///
/// These are all server errors that the vanilla AIRMASH
/// client (and the current STARMASH client) understands.
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
#[cfg_attr(feature = "specs", derive(Component))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ErrorType {
	DisconnectedForPacketFlooding = 1,
	BannedForPacketFlooding = 2,
	Banned = 3,
	IdleRequiredBeforeRespawn = 5,
	AfkTimeout = 6,
	Kicked = 7,
	InvalidLogin = 8,
	IncorrectProtocolLevel = 9,
	AccountBanned = 10,
	AccountAlreadyLoggedIn = 11,
	NoRespawnInBTR = 12,
	IdleRequiredBeforeSpectate = 13,
	NotEnoughUpgrades = 20,
	ChatThrottled = 30,
	FlagChangeThrottled = 31,
	UnknownCommand = 100,
}
}