summaryrefslogtreecommitdiff
path: root/src/login/login.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2015-01-08 14:36:40 -0800
committerBen Longbons <b.r.longbons@gmail.com>2015-01-23 01:44:26 -0800
commit35b95e24ea1915acf0ef13047209f76bce6d9b7b (patch)
tree650cc854b324b0b6f3e269075a394914d0834b26 /src/login/login.hpp
parentfc07b1e9c72e795e18f9d212e7a72bdb31904c5b (diff)
downloadtmwa-35b95e24ea1915acf0ef13047209f76bce6d9b7b.tar.gz
tmwa-35b95e24ea1915acf0ef13047209f76bce6d9b7b.tar.bz2
tmwa-35b95e24ea1915acf0ef13047209f76bce6d9b7b.tar.xz
tmwa-35b95e24ea1915acf0ef13047209f76bce6d9b7b.zip
Use generated config for login
Diffstat (limited to 'src/login/login.hpp')
-rw-r--r--src/login/login.hpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/login/login.hpp b/src/login/login.hpp
index 5900440..ae99558 100644
--- a/src/login/login.hpp
+++ b/src/login/login.hpp
@@ -22,7 +22,65 @@
#include "fwd.hpp"
+#include "../strings/vstring.hpp"
+
+#include "../compat/time_t.hpp"
+
+#include "../generic/array.hpp"
+
+#include "../net/ip.hpp"
+#include "../net/timestamp-utils.hpp"
+
+#include "../mmo/consts.hpp"
+#include "../mmo/enums.hpp"
+#include "../mmo/ids.hpp"
+#include "../mmo/strs.hpp"
+
+#include "../proto2/net-GlobalReg.hpp"
+
+#include "../high/mmo.hpp"
+
namespace tmwa
{
+namespace login
+{
+constexpr AccountId START_ACCOUNT_NUM = wrap<AccountId>(2000000);
+constexpr AccountId END_ACCOUNT_NUM = wrap<AccountId>(100000000);
+
+struct AuthData
+{
+ AccountId account_id;
+ SEX sex;
+ AccountName userid;
+ AccountCrypt pass;
+ timestamp_milliseconds_buffer lastlogin;
+ int logincount;
+ int state; // packet 0x006a value + 1 (0: compte OK)
+ AccountEmail email; // e-mail (by default: a@a.com)
+ timestamp_seconds_buffer error_message; // Message of error code #6 = Your are Prohibited to log in until %s (packet 0x006a)
+ TimeT ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
+ IP4Address last_ip; // save of last IP of connection
+ VString<254> memo; // a memo field
+ int account_reg2_num;
+ Array<GlobalReg, ACCOUNT_REG2_NUM> account_reg2;
+};
+
+struct mmo_char_server
+{
+ ServerName name;
+ IP4Address ip;
+ uint16_t port;
+ uint16_t users;
+};
+
+struct AuthFifo
+{
+ AccountId account_id;
+ int login_id1, login_id2;
+ IP4Address ip;
+ SEX sex;
+ int delflag;
+};
+} // namespace login
} // namespace tmwa