--- lbbs/src/bbs_main.c 2025/10/16 11:26:16 1.82 +++ lbbs/src/bbs_main.c 2025/10/17 07:07:55 1.85 @@ -219,10 +219,10 @@ int bbs_center() { ch = igetch(100); - if (ch != KEY_NULL && ch != KEY_TIMEOUT) - { - BBS_last_access_tm = time(NULL); - } + if (ch != KEY_NULL && ch != KEY_TIMEOUT) + { + BBS_last_access_tm = time(NULL); + } if (bbs_menu.choose_step == 0 && time(NULL) - t_last_action >= 10) { @@ -252,7 +252,6 @@ int bbs_center() } continue; case CR: - igetch_reset(); default: switch (menu_control(&bbs_menu, ch)) { @@ -336,12 +335,15 @@ int bbs_main() { prints("\033[1m%s 欢迎使用ssh方式访问 \033[1;33m按任意键继续...\033[m", BBS_username); iflush(); - igetch_t(MAX_DELAY_TIME); + igetch_reset(); + while (!SYS_server_exit && igetch_t(MAX_DELAY_TIME) == 0) + ; } else if (bbs_login() < 0) { goto cleanup; } + log_common("User [%s] login\n", BBS_username); // Load article view log if (article_view_log_load(BBS_priv.uid, &BBS_article_view_log, 0) < 0)