* Implemented new "login-failed" packet for 2012 clients. (Hercules 2b2b189)
* Added birthdate to @accinfo. (Hercules 57b5943) * Some other insignificant changes. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17250 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
3554554874
commit
67f080a485
@ -1,5 +1,5 @@
|
||||
//===== rAthena Script =======================================
|
||||
//= Octopus Cave
|
||||
//= Octopus Cave
|
||||
//===== By: ==================================================
|
||||
//= Muad_Dib
|
||||
//===== Current Version: =====================================
|
||||
|
@ -425,10 +425,10 @@ void mapif_parse_accinfo(int fd) {
|
||||
|
||||
/* it will only get here if we have a single match */
|
||||
if( account_id ) {
|
||||
char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pincode[5];
|
||||
char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pincode[5], birthdate[11];
|
||||
short level = -1;
|
||||
int logincount = 0,state = 0;
|
||||
if ( SQL_ERROR == Sql_Query(sql_handle, "SELECT `userid`, `user_pass`, `email`, `last_ip`, `group_id`, `lastlogin`, `logincount`, `state`,`pincode` FROM `login` WHERE `account_id` = '%d' LIMIT 1", account_id)
|
||||
if ( SQL_ERROR == Sql_Query(sql_handle, "SELECT `userid`, `user_pass`, `email`, `last_ip`, `group_id`, `lastlogin`, `logincount`, `state`,`pincode`,`birthdate` FROM `login` WHERE `account_id` = '%d' LIMIT 1", account_id)
|
||||
|| Sql_NumRows(sql_handle) == 0 ) {
|
||||
if( Sql_NumRows(sql_handle) == 0 ) {
|
||||
inter_to_fd(fd, u_fd, aid, "No account with ID '%d' was found.", account_id );
|
||||
@ -447,6 +447,7 @@ void mapif_parse_accinfo(int fd) {
|
||||
Sql_GetData(sql_handle, 6, &data, NULL); logincount = atoi(data);
|
||||
Sql_GetData(sql_handle, 7, &data, NULL); state = atoi(data);
|
||||
Sql_GetData(sql_handle, 8, &data, NULL); safestrncpy(pincode, data, sizeof(pincode));
|
||||
Sql_GetData(sql_handle, 9, &data, NULL); safestrncpy(birthdate, data, sizeof(birthdate));
|
||||
}
|
||||
|
||||
Sql_FreeResult(sql_handle);
|
||||
@ -464,9 +465,9 @@ void mapif_parse_accinfo(int fd) {
|
||||
inter_to_fd(fd, u_fd, aid, "Password: %s", user_pass );
|
||||
}
|
||||
|
||||
inter_to_fd(fd, u_fd, aid, "Account e-mail: %s", email);
|
||||
inter_to_fd(fd, u_fd, aid, "Account e-mail: %s | Birthdate: %s", email, birthdate);
|
||||
inter_to_fd(fd, u_fd, aid, "Last IP: %s (%s)", last_ip, geoip_getcountry(str2ip(last_ip)) );
|
||||
inter_to_fd(fd, u_fd, aid, "This user has logged %d times, the last time were at %s", logincount, lastlogin );
|
||||
inter_to_fd(fd, u_fd, aid, "This user has logged in %d times, the last time was at %s", logincount, lastlogin );
|
||||
inter_to_fd(fd, u_fd, aid, "-- Character Details --" );
|
||||
|
||||
|
||||
|
@ -1309,18 +1309,31 @@ void login_auth_failed(struct login_session_data* sd, int result)
|
||||
if( result == 1 && login_config.dynamic_pass_failure_ban )
|
||||
ipban_log(ip); // log failed password attempt
|
||||
|
||||
#if PACKETVER >= 20120000 /* not sure when this started */
|
||||
WFIFOHEAD(fd,26);
|
||||
WFIFOW(fd,0) = 0x83e;
|
||||
WFIFOL(fd,2) = result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,6), '\0', 20);
|
||||
else { // 6 = Your are Prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string((char*)WFIFOP(fd,6), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
WFIFOSET(fd,26);
|
||||
#else
|
||||
WFIFOHEAD(fd,23);
|
||||
WFIFOW(fd,0) = 0x6a;
|
||||
WFIFOB(fd,2) = (uint8)result;
|
||||
if( result != 6 )
|
||||
memset(WFIFOP(fd,3), '\0', 20);
|
||||
else
|
||||
{// 6 = Your are Prohibited to log in until %s
|
||||
else { // 6 = Your are Prohibited to log in until %s
|
||||
struct mmo_account acc;
|
||||
time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0;
|
||||
timestamp2string((char*)WFIFOP(fd,3), 20, unban_time, login_config.date_format);
|
||||
}
|
||||
WFIFOSET(fd,23);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -8835,8 +8835,6 @@ ACMD_FUNC(join) {
|
||||
}
|
||||
|
||||
static inline void atcmd_channel_help(int fd, const char *command, bool can_create) {
|
||||
sprintf(atcmd_output, msg_txt(1404),command); // %s failed.
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
clif_displaymessage(fd, msg_txt(1414));// ---- Available options:
|
||||
if( can_create ) {
|
||||
sprintf(atcmd_output, msg_txt(1415),command);// * %s create <#channel_name> <channel_password>
|
||||
@ -8863,6 +8861,8 @@ static inline void atcmd_channel_help(int fd, const char *command, bool can_crea
|
||||
sprintf(atcmd_output, msg_txt(1429),command);// * %s unbind
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
clif_displaymessage(fd, msg_txt(1430));// -- Unbinds your global chat from the attached channel, if any.
|
||||
sprintf(atcmd_output, msg_txt(1404),command); // %s failed.
|
||||
clif_displaymessage(fd, atcmd_output);
|
||||
}
|
||||
|
||||
ACMD_FUNC(channel) {
|
||||
|
@ -401,7 +401,6 @@ int guild_create(struct map_session_data *sd, const char *name)
|
||||
int guild_created(int account_id,int guild_id)
|
||||
{
|
||||
struct map_session_data *sd=map_id2sd(account_id);
|
||||
struct guild *guild;
|
||||
|
||||
if(sd==NULL)
|
||||
return 0;
|
||||
|
@ -6620,7 +6620,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
}
|
||||
|
||||
undead_flag = battle_check_undead(status->race,status->def_ele);
|
||||
//Check for inmunities / sc fails
|
||||
//Check for immunities / sc fails
|
||||
switch (type) {
|
||||
case SC_ANGRIFFS_MODUS:
|
||||
case SC_GOLDENE_FERSE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user