mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-16 20:24:39 -06:00
Compare commits
3 Commits
v3.1.1
...
stargazers
| Author | SHA1 | Date | |
|---|---|---|---|
| 56675384af | |||
|
|
ae37641635 | ||
| 566791e647 |
@@ -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
|
||||
[](https://starchart.cc/DarkflameUniverse/DarkflameServer)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user