summaryrefslogtreecommitdiff
path: root/src/gui/char_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/char_server.cpp')
-rw-r--r--src/gui/char_server.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index 638c05a6..b5ce9021 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -48,8 +48,10 @@ class ServerListModel : public gcn::ListModel {
std::string getElementAt(int i);
};
-ServerSelectDialog::ServerSelectDialog(LoginData *loginData):
- Window("Select Server"), mLoginData(loginData)
+ServerSelectDialog::ServerSelectDialog(LoginData *loginData, int nextState):
+ Window("Select Server"),
+ mLoginData(loginData),
+ mNextState(nextState)
{
mServerListModel = new ServerListModel();
mServerList = new ListBox(mServerListModel);
@@ -105,10 +107,12 @@ ServerSelectDialog::action(const gcn::ActionEvent &event)
const SERVER_INFO *si = server_info[mServerList->getSelected()];
mLoginData->hostname = iptostring(si->address);
mLoginData->port = si->port;
- state = CHAR_CONNECT_STATE;
+ mLoginData->updateHost = si->updateHost;
+
+ state = mNextState;
}
else if (event.getId() == "cancel") {
- state = LOADDATA_STATE;
+ state = LOGIN_STATE;
}
}