--- lbbs/src/menu_proc.c 2025/11/11 00:28:05 1.50 +++ lbbs/src/menu_proc.c 2025/12/01 11:28:03 1.57 @@ -15,6 +15,8 @@ #include "article_view_log.h" #include "bbs.h" #include "bbs_cmd.h" +#include "bbs_net.h" +#include "chicken.h" #include "common.h" #include "io.h" #include "log.h" @@ -68,6 +70,7 @@ int exec_mbem(void *param) c++; } +#ifdef _ENABLE_SHARED hdll = dlopen(s + 5, RTLD_LAZY); if (hdll) @@ -93,6 +96,25 @@ int exec_mbem(void *param) prints("失败原因:%s\r\n", dlerror()); press_any_key(); } +#else + (void)hdll; + (void)func; + + if (strcasecmp(c, "bbs_net") == 0) + { + bbs_net(); + } + else if (strcasecmp(c, "chicken_main") == 0) + { + chicken_main(); + } + else + { + clearscr(); + prints("未知入口 [%s] !!\r\n", c); + press_any_key(); + } +#endif } return REDRAW; @@ -103,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); @@ -253,6 +282,7 @@ int show_top10_menu(void *param) { static int show_top10 = 0; int ch = 0; + int loop; if (show_top10) { @@ -266,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); @@ -280,14 +310,14 @@ int show_top10_menu(void *param) { 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: @@ -295,7 +325,7 @@ int show_top10_menu(void *param) switch (menu_control(&top10_menu, ch)) { case EXITMENU: - ch = EXITMENU; + loop = 0; break; case REDRAW: clearscr(); @@ -308,11 +338,6 @@ int show_top10_menu(void *param) break; } } - - if (ch == EXITMENU) - { - break; - } } } @@ -380,4 +405,14 @@ int edit_intro(void *param) } return REDRAW; +} + +int edit_sign(void *param) +{ + if (user_sign_edit(BBS_priv.uid) < 0) + { + log_error("user_sign_edit(%d) error\n", BBS_priv.uid); + } + + return REDRAW; }