From 240b066f3456ef2bfbd1827930bbfe8bbcd44f39 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 16 Dec 2014 00:29:38 -0600 Subject: [PATCH] post merge fixing --- common/eqemu_config.cpp | 25 +++++++++++++++++++++++++ common/eqemu_config.h | 6 ++++++ common/shareddb.h | 3 +++ 3 files changed, 34 insertions(+) diff --git a/common/eqemu_config.cpp b/common/eqemu_config.cpp index bcf4f812d..eb62abad2 100644 --- a/common/eqemu_config.cpp +++ b/common/eqemu_config.cpp @@ -220,6 +220,29 @@ void EQEmuConfig::do_qsdatabase(TiXmlElement *ele) } } + +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; @@ -450,6 +473,8 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const return (""); } + + void EQEmuConfig::Dump() const { std::cout << "ShortName = " << ShortName << std::endl; diff --git a/common/eqemu_config.h b/common/eqemu_config.h index e22da9549..8fb1e0a5b 100644 --- a/common/eqemu_config.h +++ b/common/eqemu_config.h @@ -76,6 +76,12 @@ class EQEmuConfig : public XMLParser std::string QSDatabaseDB; uint16 QSDatabasePort; + // from + uint16 WebInterfacePort; + bool WebInterfaceUseSSL; + std::string WebInterfaceCert; + std::string WebInterfacePrivKey; + // From std::string SpellsFile; std::string OpCodesFile; diff --git a/common/shareddb.h b/common/shareddb.h index 073c385e8..d6c3cb8af 100644 --- a/common/shareddb.h +++ b/common/shareddb.h @@ -81,6 +81,9 @@ class SharedDatabase : public Database ItemInst* CreateItem(const Item_Struct* item, int16 charges = 0, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0, uint8 attuned = 0); ItemInst* CreateBaseItem(const Item_Struct* item, int16 charges = 0); + // Web Token Verification + bool VerifyToken(std::string token, int& status); + /* Shared Memory crap */