summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f1b363e9..9bf761a0 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -532,12 +532,7 @@ int Client::exec()
Net::getLoginHandler()->disconnect();
}
else if (mState == STATE_CONNECT_SERVER &&
- mOldState == STATE_CHOOSE_SERVER)
- {
- Net::connectToServer(mCurrentServer);
- }
- else if (mState == STATE_CONNECT_SERVER &&
- mOldState != STATE_CHOOSE_SERVER &&
+ mOldState == STATE_CONNECT_SERVER &&
Net::getLoginHandler()->isConnected())
{
mState = STATE_LOGIN;
@@ -632,6 +627,9 @@ int Client::exec()
case STATE_CONNECT_SERVER:
logger->log("State: CONNECT SERVER");
+
+ Net::connectToServer(mCurrentServer);
+
mCurrentDialog = new ConnectionDialog(
_("Connecting to server"), STATE_SWITCH_SERVER);
break;
@@ -924,9 +922,9 @@ int Client::exec()
case STATE_SWITCH_LOGIN:
logger->log("State: SWITCH LOGIN");
- Net::getLoginHandler()->logout();
+ Net::getLoginHandler()->disconnect();
- mState = STATE_LOGIN;
+ mState = STATE_CONNECT_SERVER;
break;
case STATE_SWITCH_CHARACTER: