diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-12 21:52:27 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-16 17:43:52 -0600 |
commit | cf4a1da4eaffe19090a2246e0d3111b885a64ace (patch) | |
tree | 6187c8c7a91796e485c71ea7c88c819bec902b66 /src/net/manaserv/gamehandler.cpp | |
parent | 11a6f342e579c26320334b9ae9735701386e3b25 (diff) | |
download | mana-client-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.gz mana-client-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.bz2 mana-client-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.xz mana-client-cf4a1da4eaffe19090a2246e0d3111b885a64ace.zip |
Fix canceling game connection
Reviewed-by: Bertram
Diffstat (limited to 'src/net/manaserv/gamehandler.cpp')
-rw-r--r-- | src/net/manaserv/gamehandler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/manaserv/gamehandler.cpp b/src/net/manaserv/gamehandler.cpp index 4c6c8e38..271fff15 100644 --- a/src/net/manaserv/gamehandler.cpp +++ b/src/net/manaserv/gamehandler.cpp @@ -35,9 +35,11 @@ extern ManaServ::ChatHandler *chatHandler; namespace ManaServ { +extern Connection *chatServerConnection; extern Connection *gameServerConnection; extern std::string netToken; extern ServerInfo gameServer; +extern ServerInfo chatServer; GameHandler::GameHandler() { @@ -60,7 +62,7 @@ void GameHandler::handleMessage(Net::MessageIn &msg) if (errMsg == ERRMSG_OK) { netToken = msg.readString(32); -\ + if (!netToken.empty()) { Client::setState(STATE_SWITCH_CHARACTER); @@ -91,7 +93,8 @@ void GameHandler::handleMessage(Net::MessageIn &msg) void GameHandler::connect() { - // + gameServerConnection->connect(gameServer.hostname, gameServer.port); + chatServerConnection->connect(chatServer.hostname, chatServer.port); } bool GameHandler::isConnected() |