diff --git a/bbs.c b/bbs.c index 5c1252e..028ab99 100644 --- a/bbs.c +++ b/bbs.c @@ -243,13 +243,6 @@ char s_getchar() { } } } - - - /* if (c == '\r') { - if (len == 0) { - disconnect("Socket Closed"); - } - }*/ } while (c == '\n'); usertimeout = 10; @@ -576,6 +569,7 @@ void runbbs_real(int socket, char *ip, int ssh) { if (strcasecmp(buffer, "new") == 0) { user = new_user(); + gUser = user; } else { s_printf("\r\nPassword:> "); s_readpass(password, 16); diff --git a/users.c b/users.c index 89f39f8..62fc331 100644 --- a/users.c +++ b/users.c @@ -265,8 +265,8 @@ struct user_record *check_user_pass(char *loginname, char *password) { user->timeleft = sqlite3_column_int(res, 10); user->cur_mail_conf = sqlite3_column_int(res, 11); user->cur_mail_area = sqlite3_column_int(res, 12); - user->cur_file_dir = sqlite3_column_int(res, 14); - user->cur_file_sub = sqlite3_column_int(res, 13); + user->cur_file_dir = sqlite3_column_int(res, 13); + user->cur_file_sub = sqlite3_column_int(res, 14); user->timeson = sqlite3_column_int(res, 15); pass_hash = hash_sha256(password, user->salt);