aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Main.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-07-15 00:45:16 +0200
committerShauren <shauren.trinity@gmail.com>2023-07-15 00:45:16 +0200
commit6be536a73bc8a6e331ce20e7d19e2ea56b99b4d0 (patch)
tree2ad2ae6d9f4096c97235063eff60e7d69641a2b9 /src/server/worldserver/Main.cpp
parentcdfaecda52e165bb04381e1677108ff87b8bdf13 (diff)
Core/Network: Refactor local/remote ip address selection code and allow using hostnames in LoginREST bnetserver config options
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r--src/server/worldserver/Main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index d56fa0156da..013b4b0f977 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -34,10 +34,10 @@
#include "GitRevision.h"
#include "InstanceLockMgr.h"
#include "IoContext.h"
+#include "IpNetwork.h"
#include "MapManager.h"
#include "Metric.h"
#include "MySQLThreading.h"
-#include "ObjectAccessor.h"
#include "OpenSSLCrypto.h"
#include "OutdoorPvP/OutdoorPvPMgr.h"
#include "ProcessPriority.h"
@@ -290,6 +290,8 @@ extern int main(int argc, char** argv)
if (vm.count("update-databases-only"))
return 0;
+ Trinity::Net::ScanLocalNetworks();
+
// Set server offline (not connectable)
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | {} WHERE id = '{}'", REALM_FLAG_OFFLINE, realm.Id.Realm);
@@ -619,7 +621,6 @@ bool LoadRealmInfo()
realm.Build = realmListRealm->Build;
realm.ExternalAddress = std::make_unique<boost::asio::ip::address>(*realmListRealm->ExternalAddress);
realm.LocalAddress = std::make_unique<boost::asio::ip::address>(*realmListRealm->LocalAddress);
- realm.LocalSubnetMask = std::make_unique<boost::asio::ip::address>(*realmListRealm->LocalSubnetMask);
realm.Port = realmListRealm->Port;
realm.Name = realmListRealm->Name;
realm.NormalizedName = realmListRealm->NormalizedName;