1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-12 05:27:45 +00:00
sapphire/src/common/Config/ConfigDef.h

96 lines
1.5 KiB
C
Raw Normal View History

#ifndef SAPPHIRE_CONFIGDEF_H
#define SAPPHIRE_CONFIGDEF_H
2019-01-07 22:11:52 +11:00
namespace Sapphire::Common::Config
{
2019-01-07 22:11:52 +11:00
struct GlobalConfig
{
struct Database
{
std::string host;
uint16_t port;
std::string database;
std::string username;
std::string password;
uint8_t syncThreads;
uint8_t asyncThreads;
} database;
2019-01-07 22:11:52 +11:00
struct Parameters
{
std::string serverSecret;
std::string dataPath;
2019-01-07 22:11:52 +11:00
uint16_t worldID;
} parameters;
2019-01-07 22:11:52 +11:00
struct Network
{
std::string zoneHost;
uint16_t zonePort;
std::string lobbyHost;
uint16_t lobbyPort;
std::string restHost;
uint16_t restPort;
2019-01-07 22:11:52 +11:00
} network;
};
2019-01-07 22:11:52 +11:00
struct WorldConfig
{
GlobalConfig global;
struct Network
{
std::string listenIp;
uint16_t listenPort;
2019-01-07 22:11:52 +11:00
uint16_t disconnectTimeout;
} network;
2019-01-07 22:11:52 +11:00
struct Housing
{
2019-01-07 22:11:52 +11:00
std::string defaultEstateName;
} housing;
struct Scripts
{
std::string path;
std::string cachePath;
bool hotSwap;
} scripts;
2019-01-07 22:11:52 +11:00
std::string motd;
};
2019-01-07 22:11:52 +11:00
struct LobbyConfig
{
GlobalConfig global;
2019-01-07 22:11:52 +11:00
struct Network
{
std::string listenIp;
uint16_t listenPort;
2019-01-07 22:11:52 +11:00
} network;
2019-01-07 22:11:52 +11:00
bool allowNoSessionConnect;
std::string worldName;
2019-01-07 22:11:52 +11:00
uint8_t defaultGMRank;
};
struct ApiConfig
{
GlobalConfig global;
struct Network
{
2019-01-07 22:11:52 +11:00
std::string listenIP;
uint16_t listenPort;
} network;
};
}
#endif //SAPPHIRE_CONFIGDEF_H