diff --git a/dChatServer/ChatServer.cpp b/dChatServer/ChatServer.cpp index 7eef11d5..2323867b 100644 --- a/dChatServer/ChatServer.cpp +++ b/dChatServer/ChatServer.cpp @@ -126,10 +126,10 @@ int main(int argc, char** argv) { bool web_server_enabled = Game::config->GetValue("web_server_enabled") == "1"; - auto chatwebapi = ChatWebAPI(); + ChatWebAPI chatwebapi; if (web_server_enabled) { - LOG("Web server enabled, will process http requests."); + chatwebapi = ChatWebAPI(); } auto lastTime = std::chrono::high_resolution_clock::now(); diff --git a/dChatServer/ChatWebAPI.cpp b/dChatServer/ChatWebAPI.cpp index 6759fb93..c8172872 100644 --- a/dChatServer/ChatWebAPI.cpp +++ b/dChatServer/ChatWebAPI.cpp @@ -111,9 +111,8 @@ ChatWebAPI::ChatWebAPI() { // make listen address std::string listen_ip = Game::config->GetValue("web_server_listen_ip"); std::string listen_port = Game::config->GetValue("wed_server_listen_port"); - LOG_DEBUG("Starting web server on %s:%s", listen_ip.c_str(), listen_port.c_str()); std::string listen_address = "http://" + listen_ip + ":" + listen_port; - LOG_DEBUG("Starting web server on %s", listen_address.c_str()); + LOG("Starting web server on %s", listen_address.c_str()); mg_mgr_init(&mgr); // Initialise event manager mg_http_listen(&mgr, listen_address.c_str(), HandleRequests, NULL); // Create HTTP listener } diff --git a/dChatServer/PlayerContainer.h b/dChatServer/PlayerContainer.h index aa749e7e..91097134 100644 --- a/dChatServer/PlayerContainer.h +++ b/dChatServer/PlayerContainer.h @@ -6,7 +6,7 @@ #include "Game.h" #include "dServer.h" #include -#include "nlohmann/json.hpp" +#include "json.hpp" enum class eGameMasterLevel : uint8_t;