23 NETWORK_VEH_TRAIN = 0,
37 SERVER_GAME_TYPE_LOCAL = 0,
38 SERVER_GAME_TYPE_PUBLIC,
39 SERVER_GAME_TYPE_INVITE_ONLY,
82 NETWORK_ACTION_SERVER_MESSAGE,
84 NETWORK_ACTION_CHAT_COMPANY,
85 NETWORK_ACTION_CHAT_CLIENT,
86 NETWORK_ACTION_GIVE_MONEY,
87 NETWORK_ACTION_NAME_CHANGE,
88 NETWORK_ACTION_COMPANY_SPECTATOR,
89 NETWORK_ACTION_COMPANY_JOIN,
90 NETWORK_ACTION_COMPANY_NEW,
91 NETWORK_ACTION_KICKED,
92 NETWORK_ACTION_EXTERNAL_CHAT,
100 NETWORK_ERROR_GENERAL,
103 NETWORK_ERROR_DESYNC,
104 NETWORK_ERROR_SAVEGAME_FAILED,
105 NETWORK_ERROR_CONNECTION_LOST,
106 NETWORK_ERROR_ILLEGAL_PACKET,
107 NETWORK_ERROR_NEWGRF_MISMATCH,
110 NETWORK_ERROR_NOT_AUTHORIZED,
111 NETWORK_ERROR_NOT_EXPECTED,
112 NETWORK_ERROR_WRONG_REVISION,
113 NETWORK_ERROR_NAME_IN_USE,
114 NETWORK_ERROR_WRONG_PASSWORD,
115 NETWORK_ERROR_COMPANY_MISMATCH,
116 NETWORK_ERROR_KICKED,
117 NETWORK_ERROR_CHEATER,
119 NETWORK_ERROR_TOO_MANY_COMMANDS,
120 NETWORK_ERROR_TIMEOUT_PASSWORD,
121 NETWORK_ERROR_TIMEOUT_COMPUTER,
122 NETWORK_ERROR_TIMEOUT_MAP,
123 NETWORK_ERROR_TIMEOUT_JOIN,
124 NETWORK_ERROR_INVALID_CLIENT_NAME,
125 NETWORK_ERROR_NOT_ON_ALLOW_LIST,
126 NETWORK_ERROR_NO_AUTHENTICATION_METHOD_AVAILABLE,
139 bool Contains(std::string_view key)
const;
140 bool Add(std::string_view key);
141 bool Remove(std::string_view key);
Simple helper to (more easily) manage authorized keys.
bool Contains(std::string_view key) const
Check whether the given key is contains in these authorized keys.
bool Add(std::string_view key)
Add the given key to the authorized keys, when it is not already contained.
bool Remove(std::string_view key)
Remove the given key from the authorized keys, when it is exists.
Type (helpers) for enums.
#define DECLARE_ENUM_AS_ADDABLE(EnumType)
Operator that allows this enumeration to be added to any other enumeration.
NetworkVehicleType
Vehicletypes in the order they are send in info packets.
DestType
Destination of our chat messages.
@ DESTTYPE_CLIENT
Send message/notice to only a certain client (Private).
@ DESTTYPE_TEAM
Send message/notice to everyone playing the same company (Team).
@ DESTTYPE_BROADCAST
Send message/notice to all clients (All).
PoolID< uint8_t, struct AdminIDTag, 16, 0xFF > AdminID
Indices into the admin tables.
NetworkErrorCode
The error codes we send around in the protocols.
NetworkAction
Actions that can be used for NetworkTextMessage.
static const uint MAX_CLIENTS
How many clients can we have.
ClientID
'Unique' identifier to be given to clients
@ INVALID_CLIENT_ID
Client is not part of anything.
@ CLIENT_ID_SERVER
Servers always have this ID.
@ CLIENT_ID_FIRST
The first client ID.
ServerGameType
Game type the server can be using.
PoolID< uint16_t, struct ClientPoolIDTag, MAX_CLIENTS+1, 0xFFFF > ClientPoolID
Indices into the client related pools.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Container for all information known about a client.
Simple calculated statistics of a company.
uint16_t num_vehicle[NETWORK_VEH_END]
How many vehicles are there of this type?
uint16_t num_station[NETWORK_VEH_END]
How many stations are there of this type?
bool ai
Is this company an AI.
Templated helper to make a PoolID a single POD value.