summaryrefslogtreecommitdiff
path: root/src/login/login.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-01-23 19:12:19 +0100
committerHaru <haru@dotalux.com>2015-06-01 10:11:39 +0200
commit0a54d25ccfd891814cbdada8589b48c6b9da23fd (patch)
treef95231f444f91c292410d01ac75537df578c74fa /src/login/login.h
parent2e5e04c5b6e248cb05df4814dbe0d7eed2fe0293 (diff)
downloadhercules-0a54d25ccfd891814cbdada8589b48c6b9da23fd.tar.gz
hercules-0a54d25ccfd891814cbdada8589b48c6b9da23fd.tar.bz2
hercules-0a54d25ccfd891814cbdada8589b48c6b9da23fd.tar.xz
hercules-0a54d25ccfd891814cbdada8589b48c6b9da23fd.zip
Replaced some of the hardcoded values with constants (login)
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/login/login.h')
-rw-r--r--src/login/login.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/login/login.h b/src/login/login.h
index 7254b5db2..22bae50e0 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -18,8 +18,15 @@ enum E_LOGINSERVER_ST
LOGINSERVER_ST_LAST
};
-// supported encryption types: 1- passwordencrypt, 2- passwordencrypt2, 3- both
-#define PASSWORDENC 3
+enum password_enc {
+ PWENC_NONE = 0x0, ///< No encryption
+ PWENC_ENCRYPT = 0x1, ///< passwordencrypt
+ PWENC_ENCRYPT2 = 0x2, ///< passwordencrypt2
+ PWENC_BOTH = PWENC_ENCRYPT|PWENC_ENCRYPT2, ///< both the above
+};
+
+#define PASSWORDENC PWENC_BOTH
+
#define PASSWD_LEN (32+1) // 23+1 for plaintext, 32+1 for md5-ed passwords
struct login_session_data {
@@ -53,9 +60,9 @@ struct mmo_char_server {
int fd;
uint32 ip;
uint16 port;
- uint16 users; // user count on this server
- uint16 type; // 0=normal, 1=maintenance, 2=over 18, 3=paying, 4=P2P
- uint16 new_; // should display as 'new'?
+ uint16 users; ///< user count on this server
+ uint16 type; ///< 0=normal, 1=maintenance, 2=over 18, 3=paying, 4=P2P (@see e_char_server_type in mmo.h)
+ uint16 new_; ///< should display as 'new'?
};
struct client_hash_node {