summaryrefslogtreecommitdiff
path: root/src/login/lclif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/lclif.c')
-rw-r--r--src/login/lclif.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/login/lclif.c b/src/login/lclif.c
index f32538610..1870f9bc9 100644
--- a/src/login/lclif.c
+++ b/src/login/lclif.c
@@ -216,6 +216,15 @@ enum parsefunc_rcode lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_d
return PACKET_VALID;
}
+/// @copydoc lclif_interface_private::parse_CA_LOGIN_OTP()
+enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
+enum parsefunc_rcode lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd)
+{
+ //const struct packet_CA_LOGIN_OTP *packet = RP2PTR(fd);
+ login->client_login_otp(fd, sd);
+ return PACKET_VALID;
+}
+
/// @copydoc lclif_interface_private::parse_CA_REQ_HASH()
enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) __attribute__((nonnull (2)));
enum parsefunc_rcode lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd)
@@ -284,7 +293,7 @@ bool lclif_send_server_list(struct login_session_data *sd)
packet->server_list[n].ip = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip);
packet->server_list[n].port = sockt->ntows(htons(server[i].port)); // [!] LE byte order here [!]
safestrncpy(packet->server_list[n].name, server[i].name, 20);
- packet->server_list[n].usercount = server[i].users;
+ packet->server_list[n].usercount = login->convert_users_to_colors(server[i].users);
if (server[i].type == CST_PAYING && sd->expiration_time > time(NULL))
packet->server_list[n].property = CST_NORMAL;
@@ -502,6 +511,7 @@ void packetdb_loaddb(void)
packet_def(CA_LOGIN_PCBANG),
packet_def(CA_LOGIN_HAN),
packet_def2(CA_SSO_LOGIN_REQ, -1),
+ packet_def(CA_LOGIN_OTP),
packet_def(CA_REQ_HASH),
#undef packet_def
#undef packet_def2
@@ -512,7 +522,7 @@ void packetdb_loaddb(void)
for (i = 0; i < length; ++i) {
int16 packet_id = packet[i].packet_id;
- Assert_retb(packet_id >= MIN_PACKET_DB && packet_id < MAX_PACKET_DB);
+ Assert_retb(packet_id >= MIN_PACKET_DB && packet_id <= MAX_PACKET_DB);
lclif->p->dbs->packet_db[packet_id].len = packet[i].packet_len;
lclif->p->dbs->packet_db[packet_id].pFunc = packet[i].pFunc;
}
@@ -565,6 +575,7 @@ void lclif_defaults(void)
lclif->p->parse_CA_LOGIN_PCBANG = lclif_parse_CA_LOGIN_PCBANG;
lclif->p->parse_CA_LOGIN_HAN = lclif_parse_CA_LOGIN_HAN;
lclif->p->parse_CA_SSO_LOGIN_REQ = lclif_parse_CA_SSO_LOGIN_REQ;
+ lclif->p->parse_CA_LOGIN_OTP = lclif_parse_CA_LOGIN_OTP;
lclif->p->parse_CA_REQ_HASH = lclif_parse_CA_REQ_HASH;
lclif->p->parse_CA_CHARSERVERCONNECT = lclif_parse_CA_CHARSERVERCONNECT;
}