/[LeafOK_CVS]/lbbs/src/menu_proc.c
ViewVC logotype

Diff of /lbbs/src/menu_proc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.54 by sysadm, Fri Nov 21 10:52:47 2025 UTC Revision 1.58 by sysadm, Wed Dec 3 05:31:11 2025 UTC
# Line 70  int exec_mbem(void *param) Line 70  int exec_mbem(void *param)
70                          c++;                          c++;
71                  }                  }
72    
73  #ifdef _LOAD_SO  #ifdef _ENABLE_SHARED
74                  hdll = dlopen(s + 5, RTLD_LAZY);                  hdll = dlopen(s + 5, RTLD_LAZY);
75    
76                  if (hdll)                  if (hdll)
# Line 125  int exit_bbs(void *param) Line 125  int exit_bbs(void *param)
125          return EXITBBS;          return EXITBBS;
126  }  }
127    
128    int eula(void *param)
129    {
130            display_file(DATA_EULA, 0);
131    
132            return REDRAW;
133    }
134    
135  int license(void *param)  int license(void *param)
136  {  {
137          display_file(DATA_LICENSE, 0);          display_file(DATA_LICENSE, 0);
# Line 275  int show_top10_menu(void *param) Line 282  int show_top10_menu(void *param)
282  {  {
283          static int show_top10 = 0;          static int show_top10 = 0;
284          int ch = 0;          int ch = 0;
285            int loop;
286    
287          if (show_top10)          if (show_top10)
288          {          {
# Line 288  int show_top10_menu(void *param) Line 296  int show_top10_menu(void *param)
296    
297          if (display_menu(&top10_menu) == 0)          if (display_menu(&top10_menu) == 0)
298          {          {
299                  while (!SYS_server_exit)                  for (loop = 1; !SYS_server_exit && loop;)
300                  {                  {
301                          iflush();                          iflush();
302                          ch = igetch(100);                          ch = igetch(100);
# Line 298  int show_top10_menu(void *param) Line 306  int show_top10_menu(void *param)
306                                  BBS_last_access_tm = time(NULL);                                  BBS_last_access_tm = time(NULL);
307                          }                          }
308    
309                            if (user_online_update("TOP10_MENU") < 0)
310                            {
311                                    log_error("user_online_update(TOP10_MENU) error\n");
312                            }
313    
314                          switch (ch)                          switch (ch)
315                          {                          {
316                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
317                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
318                                  show_top10 = 0;                                  loop = 0;
319                                  return 0;                                  break;
320                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
321                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
322                                  {                                  {
323                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
324                                          show_top10 = 0;                                          loop = 0;
325                                          return 0;                                          break;
326                                  }                                  }
327                                  continue;                                  continue;
328                          case CR:                          case CR:
# Line 317  int show_top10_menu(void *param) Line 330  int show_top10_menu(void *param)
330                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
331                                  {                                  {
332                                  case EXITMENU:                                  case EXITMENU:
333                                          ch = EXITMENU;                                          loop = 0;
334                                          break;                                          break;
335                                  case REDRAW:                                  case REDRAW:
336                                          clearscr();                                          clearscr();
# Line 330  int show_top10_menu(void *param) Line 343  int show_top10_menu(void *param)
343                                          break;                                          break;
344                                  }                                  }
345                          }                          }
   
                         if (ch == EXITMENU)  
                         {  
                                 break;  
                         }  
346                  }                  }
347          }          }
348    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1