summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-11 22:11:17 -0300
committershennetsind <ind@henn.et>2013-04-11 22:11:17 -0300
commit57b5943b55e8b8bcede9b4aa944ff855687a366a (patch)
tree67aacdb7c63cd7ea1aab1e87177df319ea403e8f
parente452716f7e9ffde75e17b360a284d7c6b8a080cf (diff)
downloadhercules-57b5943b55e8b8bcede9b4aa944ff855687a366a.tar.gz
hercules-57b5943b55e8b8bcede9b4aa944ff855687a366a.tar.bz2
hercules-57b5943b55e8b8bcede9b4aa944ff855687a366a.tar.xz
hercules-57b5943b55e8b8bcede9b4aa944ff855687a366a.zip
Added birthdate to @accinfo
As suggested by kyeme in http://hercules.ws/board/topic/292-suggestion-in-accinfo/ Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/char/inter.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index dec217d02..7fd1e089a 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -489,10 +489,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 );
@@ -511,6 +511,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);
@@ -528,7 +529,7 @@ 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, "-- Character Details --" );