diff options
-rw-r--r-- | docs/manaserv.xml.example | 6 | ||||
-rw-r--r-- | src/account-server/accounthandler.cpp | 4 | ||||
-rw-r--r-- | src/game-server/accountconnection.cpp | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/docs/manaserv.xml.example b/docs/manaserv.xml.example index a2171e9c..75331b65 100644 --- a/docs/manaserv.xml.example +++ b/docs/manaserv.xml.example @@ -148,6 +148,9 @@ --> <option name="net_chatHost" value="localhost"/> <option name="net_chatListenToClientPort" value="9603"/> + <!-- needed to set when hosting behind router or in situations + where you cannot bind the server to the public url --> + <!-- <option name="net_publicChatHost" value="mydomain.org"/> --> <!-- The clients use this address to connect to a game server on this machine. @@ -156,6 +159,9 @@ --> <option name="net_gameHost" value="localhost"/> <option name="net_gameListenToClientPort" value="9604"/> + <!-- needed to set when hosting behind router or in situations + where you cannot bind the server to the public url --> + <!-- <option name="net_publicGameHost" value="mydomain.org"/> --> <!-- Update host url: E.g.: "http://updates.manasource.org/" diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp index b0ac4d57..3590dbeb 100644 --- a/src/account-server/accounthandler.cpp +++ b/src/account-server/accounthandler.cpp @@ -881,8 +881,8 @@ void AccountHandler::handleCharacterSelectMessage(AccountClient &client, reply.writeInt16(port); // Give address and port for the chat server - reply.writeString(Configuration::getValue("net_chatHost", - "localhost")); + reply.writeString(Configuration::getValue("net_publicChatHost", + Configuration::getValue("net_chatHost", "localhost"))); // When the chatListenToClientPort is set, we use it. // Otherwise, we use the accountListenToClientPort + 2 if the option is set. diff --git a/src/game-server/accountconnection.cpp b/src/game-server/accountconnection.cpp index 52282a99..3d37ea67 100644 --- a/src/game-server/accountconnection.cpp +++ b/src/game-server/accountconnection.cpp @@ -78,7 +78,9 @@ bool AccountConnection::start(int gameServerPort) LOG_INFO("Connection established to the account server."); const std::string gameServerAddress = - Configuration::getValue("net_gameHost", "localhost"); + Configuration::getValue("net_publicGameHost", + Configuration::getValue("net_gameHost", + "localhost")); const std::string password = Configuration::getValue("net_password", "changeMe"); |