--- lbbs/src/menu_proc.c 2025/11/21 07:56:00 1.53 +++ lbbs/src/menu_proc.c 2025/12/03 05:31:11 1.58 @@ -70,7 +70,7 @@ int exec_mbem(void *param) c++; } -#ifdef LOAD_SO +#ifdef _ENABLE_SHARED hdll = dlopen(s + 5, RTLD_LAZY); if (hdll) @@ -125,6 +125,13 @@ int exit_bbs(void *param) return EXITBBS; } +int eula(void *param) +{ + display_file(DATA_EULA, 0); + + return REDRAW; +} + int license(void *param) { display_file(DATA_LICENSE, 0); @@ -275,6 +282,7 @@ int show_top10_menu(void *param) { static int show_top10 = 0; int ch = 0; + int loop; if (show_top10) { @@ -288,7 +296,7 @@ int show_top10_menu(void *param) if (display_menu(&top10_menu) == 0) { - while (!SYS_server_exit) + for (loop = 1; !SYS_server_exit && loop;) { iflush(); ch = igetch(100); @@ -298,18 +306,23 @@ int show_top10_menu(void *param) BBS_last_access_tm = time(NULL); } + if (user_online_update("TOP10_MENU") < 0) + { + log_error("user_online_update(TOP10_MENU) error\n"); + } + switch (ch) { case KEY_NULL: // broken pipe log_error("KEY_NULL\n"); - show_top10 = 0; - return 0; + loop = 0; + break; case KEY_TIMEOUT: if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time) { log_error("User input timeout\n"); - show_top10 = 0; - return 0; + loop = 0; + break; } continue; case CR: @@ -317,7 +330,7 @@ int show_top10_menu(void *param) switch (menu_control(&top10_menu, ch)) { case EXITMENU: - ch = EXITMENU; + loop = 0; break; case REDRAW: clearscr(); @@ -330,11 +343,6 @@ int show_top10_menu(void *param) break; } } - - if (ch == EXITMENU) - { - break; - } } }