mirror of
https://github.com/swg-ostrich/src.git
synced 2026-01-16 23:05:03 -05:00
Get IP for cluster list from database if you want (#1)
Adds seefo's patch for easier external access and makes it available through a config setting so that nothing will change for you if you don't really care.
This commit is contained in:
@@ -87,6 +87,7 @@ void ConfigLoginServer::install(void)
|
||||
KEY_INT (maxCharactersPerAccount, 20);
|
||||
KEY_BOOL (validateClientVersion, true);
|
||||
KEY_BOOL (validateStationKey, false);
|
||||
KEY_BOOL (easyExternalAccess, false);
|
||||
KEY_BOOL (doSessionLogin, false);
|
||||
KEY_BOOL (doConsumption, false);
|
||||
KEY_STRING (sessionServers, "localhost:3004");
|
||||
@@ -163,7 +164,7 @@ void ConfigLoginServer::install(void)
|
||||
}
|
||||
|
||||
{
|
||||
char keyName[500];
|
||||
char keyName[500];
|
||||
for (int index=0; index < ms_numPurgePhases; index++)
|
||||
{
|
||||
snprintf(keyName,sizeof(keyName),"purgePhaseAdvanceDays%i",index);
|
||||
|
||||
@@ -20,6 +20,7 @@ class ConfigLoginServer
|
||||
int httpServicePort;
|
||||
bool validateClientVersion;
|
||||
bool validateStationKey;
|
||||
bool easyExternalAccess;
|
||||
bool doSessionLogin;
|
||||
bool doConsumption;
|
||||
const char * sessionServers;
|
||||
@@ -80,6 +81,7 @@ class ConfigLoginServer
|
||||
static const uint16 getHttpServicePort();
|
||||
static const bool getValidateClientVersion();
|
||||
static const bool getValidateStationKey();
|
||||
static const bool getEasyExternalAccess();
|
||||
static const bool getDoSessionLogin();
|
||||
static const bool getDoConsumption();
|
||||
static const char * getSessionServers();
|
||||
@@ -217,6 +219,13 @@ inline const bool ConfigLoginServer::getValidateStationKey()
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConfigLoginServer::getEasyExternalAccess()
|
||||
{
|
||||
return (data->easyExternalAccess);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
inline const bool ConfigLoginServer::getDoSessionLogin()
|
||||
{
|
||||
return (data->doSessionLogin);
|
||||
|
||||
@@ -1438,7 +1438,11 @@ void LoginServer::sendClusterStatus(ClientConnection &conn) const {
|
||||
// size_t connectionServerChoice = Random::random(cle->m_connectionServers.size() - 1); //lint !e713 !e732 // loss of precision (arg no 1)
|
||||
ConnectionServerEntry &connServer = cle->m_connectionServers[0];
|
||||
|
||||
item.m_connectionServerAddress = connServer.clientServiceAddress;
|
||||
if (ConfigLoginServer::getEasyExternalAccess()) {
|
||||
item.m_connectionServerAddress = cle->m_address;
|
||||
} else {
|
||||
item.m_connectionServerAddress = connServer.clientServiceAddress;
|
||||
}
|
||||
if (clientIsPrivate) {
|
||||
item.m_connectionServerPort = connServer.clientServicePortPrivate;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user