mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Reworking a lot of stuff at once, this will look very chaotic.
This commit is contained in:
@@ -315,11 +315,11 @@ SOURCE_GROUP(TinyXML FILES
|
||||
|
||||
INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML)
|
||||
|
||||
ADD_LIBRARY(Common ${common_sources} ${common_headers})
|
||||
ADD_LIBRARY(common ${common_sources} ${common_headers})
|
||||
|
||||
IF(UNIX)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
SET_SOURCE_FILES_PROPERTIES("patches/SoD.cpp" "patches/SoF.cpp" "patches/RoF.cpp" "patches/Underfoot.cpp" PROPERTIES COMPILE_FLAGS -O0)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/Bin)
|
||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
+34
-2
@@ -26,7 +26,7 @@ EQEmuConfig *EQEmuConfig::_config = nullptr;
|
||||
|
||||
void EQEmuConfig::do_world(TiXmlElement *ele) {
|
||||
const char *text;
|
||||
TiXmlElement * sub_ele;;
|
||||
TiXmlElement * sub_ele;
|
||||
|
||||
text= ParseTextBlock(ele,"shortname");
|
||||
if (text)
|
||||
@@ -217,6 +217,27 @@ void EQEmuConfig::do_qsdatabase(TiXmlElement *ele) {
|
||||
QSDatabaseDB=text;
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_web_interface(TiXmlElement *ele) {
|
||||
const char *text;
|
||||
|
||||
text = ParseTextBlock(ele, "port", true);
|
||||
if (text)
|
||||
WebInterfacePort = atoi(text);
|
||||
|
||||
text = ParseTextBlock(ele, "cert", true);
|
||||
if (text)
|
||||
WebInterfaceCert = text;
|
||||
|
||||
text = ParseTextBlock(ele, "priv_key", true);
|
||||
if (text)
|
||||
WebInterfacePrivKey = text;
|
||||
|
||||
TiXmlElement *sub_ele = ele->FirstChildElement("ssl");
|
||||
if (sub_ele != nullptr) {
|
||||
WebInterfaceUseSSL = true;
|
||||
}
|
||||
}
|
||||
|
||||
void EQEmuConfig::do_zones(TiXmlElement *ele) {
|
||||
const char *text;
|
||||
TiXmlElement *sub_ele;
|
||||
@@ -372,6 +393,14 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const {
|
||||
return(QSDatabaseDB);
|
||||
if(var_name == "QSDatabasePort")
|
||||
return(itoa(QSDatabasePort));
|
||||
if (var_name == "WebInterfacePort")
|
||||
return(itoa(WebInterfacePort));
|
||||
if (var_name == "WebInterfaceUseSSL")
|
||||
return(itoa(WebInterfaceUseSSL));
|
||||
if (var_name == "WebInterfaceCert")
|
||||
return(WebInterfaceCert);
|
||||
if (var_name == "WebInterfacePrivKey")
|
||||
return(WebInterfacePrivKey);
|
||||
if(var_name == "SpellsFile")
|
||||
return(SpellsFile);
|
||||
if(var_name == "OpCodesFile")
|
||||
@@ -433,6 +462,10 @@ void EQEmuConfig::Dump() const
|
||||
std::cout << "QSDatabasePassword = " << QSDatabasePassword << std::endl;
|
||||
std::cout << "QSDatabaseDB = " << QSDatabaseDB << std::endl;
|
||||
std::cout << "QSDatabasePort = " << QSDatabasePort << std::endl;
|
||||
std::cout << "WebInterfacePort = " << WebInterfacePort << std::endl;
|
||||
std::cout << "WebInterfaceUseSSL = " << WebInterfaceUseSSL << std::endl;
|
||||
std::cout << "WebInterfaceCert = " << WebInterfaceCert << std::endl;
|
||||
std::cout << "WebInterfacePrivKey = " << WebInterfacePrivKey << std::endl;
|
||||
std::cout << "SpellsFile = " << SpellsFile << std::endl;
|
||||
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
|
||||
std::cout << "EQTimeFile = " << EQTimeFile << std::endl;
|
||||
@@ -443,6 +476,5 @@ void EQEmuConfig::Dump() const
|
||||
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
|
||||
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
|
||||
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
|
||||
// std::cout << "DynamicCount = " << DynamicCount << std::endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,12 @@ public:
|
||||
std::string QSDatabaseDB;
|
||||
uint16 QSDatabasePort;
|
||||
|
||||
// from <web_interface>
|
||||
uint16 WebInterfacePort;
|
||||
bool WebInterfaceUseSSL;
|
||||
std::string WebInterfaceCert;
|
||||
std::string WebInterfacePrivKey;
|
||||
|
||||
// From <files/>
|
||||
std::string SpellsFile;
|
||||
std::string OpCodesFile;
|
||||
@@ -158,6 +164,12 @@ protected:
|
||||
QSDatabasePassword="eq";
|
||||
QSDatabaseDB="eq";
|
||||
|
||||
// web_interface
|
||||
WebInterfacePort = 9081;
|
||||
WebInterfaceUseSSL = false;
|
||||
WebInterfaceCert = "";
|
||||
WebInterfacePrivKey = "";
|
||||
|
||||
// Files
|
||||
SpellsFile="spells_us.txt";
|
||||
OpCodesFile="opcodes.conf";
|
||||
|
||||
@@ -4,6 +4,7 @@ ELEMENT(mailserver)
|
||||
ELEMENT(zones)
|
||||
ELEMENT(database)
|
||||
ELEMENT(qsdatabase)
|
||||
ELEMENT(web_interface)
|
||||
ELEMENT(files)
|
||||
ELEMENT(directories)
|
||||
ELEMENT(launcher)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
#ifdef EQEMU_USE_STDINT
|
||||
#include <stdint.h>
|
||||
typedef uint8_t byte;
|
||||
typedef uint8_t uint8;
|
||||
@@ -29,29 +28,6 @@ typedef int8_t int8;
|
||||
typedef int16_t int16;
|
||||
typedef int32_t int32;
|
||||
typedef int64_t int64;
|
||||
#else
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
typedef unsigned short uint16;
|
||||
typedef signed short int16;
|
||||
typedef unsigned int uint32;
|
||||
typedef signed int int32;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#if defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef unsigned __int64 uint64;
|
||||
typedef signed __int64 int64;
|
||||
#else
|
||||
#error __int64 not supported
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned long long uint64;
|
||||
typedef unsigned long long uint64;
|
||||
typedef signed long long int64;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#pragma warning( disable : 4200 )
|
||||
|
||||
Reference in New Issue
Block a user