Fixed some bugs..
This commit is contained in:
parent
f04095d1f6
commit
73f9578a25
8
bbs.c
8
bbs.c
@ -243,13 +243,6 @@ char s_getchar() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* if (c == '\r') {
|
|
||||||
if (len == 0) {
|
|
||||||
disconnect("Socket Closed");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
} while (c == '\n');
|
} while (c == '\n');
|
||||||
usertimeout = 10;
|
usertimeout = 10;
|
||||||
|
|
||||||
@ -576,6 +569,7 @@ void runbbs_real(int socket, char *ip, int ssh) {
|
|||||||
|
|
||||||
if (strcasecmp(buffer, "new") == 0) {
|
if (strcasecmp(buffer, "new") == 0) {
|
||||||
user = new_user();
|
user = new_user();
|
||||||
|
gUser = user;
|
||||||
} else {
|
} else {
|
||||||
s_printf("\r\nPassword:> ");
|
s_printf("\r\nPassword:> ");
|
||||||
s_readpass(password, 16);
|
s_readpass(password, 16);
|
||||||
|
4
users.c
4
users.c
@ -265,8 +265,8 @@ struct user_record *check_user_pass(char *loginname, char *password) {
|
|||||||
user->timeleft = sqlite3_column_int(res, 10);
|
user->timeleft = sqlite3_column_int(res, 10);
|
||||||
user->cur_mail_conf = sqlite3_column_int(res, 11);
|
user->cur_mail_conf = sqlite3_column_int(res, 11);
|
||||||
user->cur_mail_area = sqlite3_column_int(res, 12);
|
user->cur_mail_area = sqlite3_column_int(res, 12);
|
||||||
user->cur_file_dir = sqlite3_column_int(res, 14);
|
user->cur_file_dir = sqlite3_column_int(res, 13);
|
||||||
user->cur_file_sub = sqlite3_column_int(res, 13);
|
user->cur_file_sub = sqlite3_column_int(res, 14);
|
||||||
user->timeson = sqlite3_column_int(res, 15);
|
user->timeson = sqlite3_column_int(res, 15);
|
||||||
|
|
||||||
pass_hash = hash_sha256(password, user->salt);
|
pass_hash = hash_sha256(password, user->salt);
|
||||||
|
Reference in New Issue
Block a user