Compare commits

...

3 Commits

Author SHA1 Message Date
56675384af Add Stargazer chart
it's cool
2025-02-04 09:14:34 -06:00
David Markowitz
ae37641635 eliminate children (#1741) 2025-01-25 20:47:51 -06:00
566791e647 chore: limit API to only listen on localhost (#1740) 2025-01-25 20:47:12 -06:00
4 changed files with 25 additions and 4 deletions

View File

@@ -500,3 +500,9 @@ This is a Work in Progress, but below are some quick links to documentaion for s
* pwjones1969
* [Simon](https://github.com/SimonNitzsche)
* [ALL OF THE NETDEVIL AND LEGO TEAMS!](https://www.mobygames.com/game/macintosh/lego-universe/credits)
## Stargazers over time
[![Stargazers over time](https://starchart.cc/DarkflameUniverse/DarkflameServer.svg?variant=adaptive)](https://starchart.cc/DarkflameUniverse/DarkflameServer)

View File

@@ -150,11 +150,12 @@ ChatWebAPI::~ChatWebAPI() {
bool ChatWebAPI::Startup() {
// Make listen address
std::string listen_ip = Game::config->GetValue("web_server_listen_ip");
if (listen_ip == "localhost") listen_ip = "127.0.0.1";
// std::string listen_ip = Game::config->GetValue("web_server_listen_ip");
// if (listen_ip == "localhost") listen_ip = "127.0.0.1";
const std::string& listen_port = Game::config->GetValue("web_server_listen_port");
const std::string& listen_address = "http://" + listen_ip + ":" + listen_port;
// const std::string& listen_address = "http://" + listen_ip + ":" + listen_port;
const std::string& listen_address = "http://localhost:" + listen_port;
LOG("Starting web server on %s", listen_address.c_str());
// Create HTTP listener

View File

@@ -43,6 +43,13 @@
#include "CDZoneTableTable.h"
#include "eGameMasterLevel.h"
#ifdef DARKFLAME_PLATFORM_UNIX
#include <sys/types.h>
#include <sys/wait.h>
#endif
namespace Game {
Logger* logger = nullptr;
dServer* server = nullptr;
@@ -455,6 +462,12 @@ int main(int argc, char** argv) {
}
}
#ifdef DARKFLAME_PLATFORM_UNIX
// kill off dead zombie instances
int status{};
waitpid(static_cast<pid_t>(-1), &status, WNOHANG);
#endif
t += std::chrono::milliseconds(masterFrameDelta);
std::this_thread::sleep_until(t);
}

View File

@@ -9,5 +9,6 @@ max_number_of_friends=50
web_server_enabled=0
web_server_listen_ip=127.0.0.1
# Unused for now
# web_server_listen_ip=127.0.0.1
web_server_listen_port=2005