diff options
author | Aki <please@ignore.pl> | 2022-02-03 22:57:49 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-02-03 22:57:49 +0100 |
commit | faeef00bb63623089d706c0c5b411b344d92bd9e (patch) | |
tree | bd6131a5d2f9a379b1468abb9c16976e1a82faa4 /Stars45/NetServerConfig.h | |
parent | 975a232cfb08410177af2ba06251e4c553780e7b (diff) | |
download | starshatter-faeef00bb63623089d706c0c5b411b344d92bd9e.zip starshatter-faeef00bb63623089d706c0c5b411b344d92bd9e.tar.gz starshatter-faeef00bb63623089d706c0c5b411b344d92bd9e.tar.bz2 |
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.
Diffstat (limited to 'Stars45/NetServerConfig.h')
-rw-r--r-- | Stars45/NetServerConfig.h | 3 |
1 files changed, 3 insertions, 0 deletions
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; |