Make startup cleaner and don't listen by default

This commit is contained in:
Aaron Kimbre
2025-01-02 16:35:27 -06:00
parent 2d08ec641c
commit 126701b5fe
3 changed files with 11 additions and 9 deletions

View File

@@ -127,11 +127,8 @@ int main(int argc, char** argv) {
bool web_server_enabled = Game::config->GetValue("web_server_enabled") == "1";
ChatWebAPI chatwebapi;
if (web_server_enabled) chatwebapi.Listen();
if (web_server_enabled) {
chatwebapi = ChatWebAPI();
}
auto lastTime = std::chrono::high_resolution_clock::now();
Game::logger->Flush(); // once immediately before main loop