summaryrefslogtreecommitdiff
path: root/src/gui/login.h
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-08-22 23:00:40 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-08-22 23:00:40 +0000
commitfca04e92ead858af3becce9aedef02c0d500e76d (patch)
tree6aacca97ed0cf5319ad53d341ae64d1f44d4f81f /src/gui/login.h
parent09dce482889058573032abacab409c29ccd6c652 (diff)
downloadmana-client-fca04e92ead858af3becce9aedef02c0d500e76d.tar.gz
mana-client-fca04e92ead858af3becce9aedef02c0d500e76d.tar.bz2
mana-client-fca04e92ead858af3becce9aedef02c0d500e76d.tar.xz
mana-client-fca04e92ead858af3becce9aedef02c0d500e76d.zip
Improved the login sequence a bit.
Diffstat (limited to 'src/gui/login.h')
-rw-r--r--src/gui/login.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/login.h b/src/gui/login.h
index 1ddb927f..002004c4 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -76,7 +76,31 @@ void login();
/**
* Attempt to login to login server
+ * Return an error code if any, and then stay at LOGIN state.
+ * 0 means ok.
+ * 1 means Wrong Password
+ * 2 means unregistered ID
+ * 3 means rejected from server
+ * 4 means blocked by GM Team
+ * 5 means expired ID
+ * 6 means unable to connect to server
+ * 9 means username already existing
+ * -1 means unknown error
*/
-void server_login(const std::string& user, const std::string& pass);
+enum
+{
+ LOGIN_OK = 0,
+ LOGIN_WRONG_PASSWORD,
+ LOGIN_UNREGISTERED_ID,
+ LOGIN_REJECTED,
+ LOGIN_BLOCKED,
+ LOGIN_EXPIRED,
+ LOGIN_NO_CONNECTION,
+ LOGIN_USERNAME_TWICE = 9,
+ LOGIN_UNKNOWN_ERROR = -1
+
+};
+
+int server_login(const std::string& user, const std::string& pass);
#endif