-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
ServerStruct.h
42 lines (39 loc) · 1.41 KB
/
ServerStruct.h
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
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SERVERSTRUCT_H
#define SERVERSTRUCT_H
#include <Server/Structs/MasterStruct.h>
#include <Server/Structs/PacketStruct.h>
#include <Server/Structs/PlayerStruct.h>
#include <Server/Structs/ProtocolStruct.h>
#include <Server/Structs/TimerStruct.h>
#include <Util/Types.h>
#include <signal.h>
typedef struct server
{
ENetHost* host;
player_t* players;
protocol_t protocol;
master_t master;
packet_t* packets;
uint16_t port;
map_t s_map;
global_timers_t global_timers;
command_t* cmds_map;
command_t* cmds_list;
string_node_t* welcome_messages;
uint8_t welcome_messages_count;
string_node_t* periodic_messages;
uint8_t periodic_message_count;
uint8_t* periodic_delays;
uint8_t global_ak;
uint8_t global_ab;
const char* manager_passwd;
const char* admin_passwd;
const char* mod_passwd;
const char* guard_passwd;
const char* trusted_passwd;
char map_name[20];
char server_name[31];
char gamemode_name[7];
volatile sig_atomic_t running; // volatile keyword is required to have an access to this variable in any thread
} server_t;
#endif