Update dChatServer/ChatWebAPI.cpp

Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.com>
This commit is contained in:
Aaron Kimbrell 2025-01-02 20:03:44 -06:00 committed by GitHub
parent 846ba894a4
commit 94d53fa77c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -122,9 +122,9 @@ ChatWebAPI::~ChatWebAPI() {
void ChatWebAPI::Listen() {
// 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");
std::string listen_address = "http://" + listen_ip + ":" + listen_port;
const std::string& listen_ip = Game::config->GetValue("web_server_listen_ip");
const std::string& listen_port = Game::config->GetValue("wed_server_listen_port");
const std::string& listen_address = "http://" + listen_ip + ":" + listen_port;
LOG("Starting web server on %s", listen_address.c_str());
mg_http_listen(&mgr, listen_address.c_str(), HandleRequests, NULL); // Create HTTP listener