diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-11 01:34:11 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-11 01:34:11 +0200 |
commit | fcced13d9972ac70f0f01f19583b7868e255b6a7 (patch) | |
tree | 9b01df102c5f9ba032ea0f9bc413dd707e99d88b /src/net/tmwa/charserverhandler.cpp | |
parent | 311783bebbe2bed366dca5097697ce34c690292d (diff) | |
parent | ef1b9856c86512fe73154c17da3ea98a7cd5f896 (diff) | |
download | manaverse-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.gz manaverse-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.bz2 manaverse-fcced13d9972ac70f0f01f19583b7868e255b6a7.tar.xz manaverse-fcced13d9972ac70f0f01f19583b7868e255b6a7.zip |
Merge branch 'master' into invfiler
Diffstat (limited to 'src/net/tmwa/charserverhandler.cpp')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index e500f667b..4bf9df8b3 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -160,7 +160,15 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg) PlayerInfo::setCharId(msg.readInt32()); GameHandler *gh = static_cast<GameHandler*>(Net::getGameHandler()); gh->setMap(msg.readString(16)); - mapServer.hostname = ipToString(msg.readInt32()); + if (config.getBoolValue("usePersistentIP")) + { + msg.readInt32(); + mapServer.hostname = Client::getServerName(); + } + else + { + mapServer.hostname = ipToString(msg.readInt32()); + } mapServer.port = msg.readInt16(); // Prevent the selected local player from being deleted |