summaryrefslogtreecommitdiff
path: root/src/net/tmwa/loginhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-10 00:07:12 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-10 00:07:12 +0200
commitc674793a8657aa099c9637c92f8696f230c327ca (patch)
treec5e8a8903aae7f4548fb7ce7f74e6c62b328059a /src/net/tmwa/loginhandler.cpp
parentef1a9531d3e48d2035ece3571b9fa1b537aedca2 (diff)
downloadplus-c674793a8657aa099c9637c92f8696f230c327ca.tar.gz
plus-c674793a8657aa099c9637c92f8696f230c327ca.tar.bz2
plus-c674793a8657aa099c9637c92f8696f230c327ca.tar.xz
plus-c674793a8657aa099c9637c92f8696f230c327ca.zip
Add persistent ip as connection option.
Usefull is player using some kind of port mapping.
Diffstat (limited to 'src/net/tmwa/loginhandler.cpp')
-rw-r--r--src/net/tmwa/loginhandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 73fec1322..05a28513c 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -288,7 +288,10 @@ void LoginHandler::chooseServer(unsigned int server)
return;
charServer.clear();
- charServer.hostname = ipToString(mWorlds[server]->address);
+ if (config.getBoolValue("usePersistentIP"))
+ charServer.hostname = Client::getServerName();
+ else
+ charServer.hostname = ipToString(mWorlds[server]->address);
charServer.port = mWorlds[server]->port;
Client::setState(STATE_UPDATE);