mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Network: Refactor local/remote ip address selection code and allow using hostnames in LoginREST bnetserver config options
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user