From faeef00bb63623089d706c0c5b411b344d92bd9e Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 3 Feb 2022 22:57:49 +0100 Subject: Added hostname to the server configuration This is in order to avoid default lookup for local address, which usually caused the game to bind to a LAN address hence effectively disallowing any other traffic in. For now there is no option in GUI to configure the hostname. Menus definitions are in the game files, so I should avoid any changes that can cause the binary to be incompatible with currently available resource packs. --- Stars45/NetServerConfig.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Stars45/NetServerConfig.h') diff --git a/Stars45/NetServerConfig.h b/Stars45/NetServerConfig.h index a81c4fd..da740cb 100644 --- a/Stars45/NetServerConfig.h +++ b/Stars45/NetServerConfig.h @@ -60,6 +60,7 @@ public: NET_GAME_PUBLIC }; + const Text& Hostname() const { return hostname; } const Text& Name() const { return name; } const Text& GetAdminName() const { return admin_name; } const Text& GetAdminPass() const { return admin_pass; } @@ -73,6 +74,7 @@ public: int GetGameType() const { return game_type; } int GetAuthLevel() const { return auth_level; } + void SetHostname(const char* s) { hostname = Clean(s); } void SetName(const char* s) { name = Clean(s); } void SetAdminName(const char* s){ admin_name = Clean(s); } void SetAdminPass(const char* s){ admin_pass = Clean(s); } @@ -100,6 +102,7 @@ private: void LoadBanList(); Text Clean(const char* s); + Text hostname; Text name; Text admin_name; Text admin_pass; -- cgit v1.1