summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-27 15:55:51 -0300
committershennetsind <ind@henn.et>2013-03-27 15:55:51 -0300
commit9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4 (patch)
tree977ec8be717168c64630081e894b21269430f3be /src/char
parent889a866e92a6c50f8a085e9c99001a9373830f44 (diff)
downloadhercules-9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4.tar.gz
hercules-9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4.tar.bz2
hercules-9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4.tar.xz
hercules-9b5ec24b69d4ae517f07ffa7a9b2730adbe998d4.zip
@accinfo update
Added pincode support Changed group_id to group_level as to respect the level hierarchy on whether to display passwords or not. Updated GeoIP Database to March 2013 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/char')
-rw-r--r--src/char/inter.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index 8ff10e290..da790e200 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -490,10 +490,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];
+ char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pincode[5];
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` 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` 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, 5, &data, NULL); safestrncpy(lastlogin, data, sizeof(lastlogin));
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_FreeResult(sql_handle);
@@ -521,8 +522,12 @@ void mapif_parse_accinfo(int fd) {
inter_to_fd(fd, u_fd, aid, "-- Account %d --", account_id );
inter_to_fd(fd, u_fd, aid, "User: %s | GM Group: %d | State: %d", userid, level, state );
- if (level < castergroup) /* only show pass if your gm level is greater than the one you're searching for */
- inter_to_fd(fd, u_fd, aid, "Password: %s", user_pass );
+ if (level < castergroup) { /* only show pass if your gm level is greater than the one you're searching for */
+ if( strlen(pincode) )
+ inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pincode );
+ else
+ 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, "Last IP: %s (%s)", last_ip, geoip_getcountry(str2ip(last_ip)) );