/[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.57 by sysadm, Mon Dec 1 11:28:03 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 302  int show_top10_menu(void *param) Line 310  int show_top10_menu(void *param)
310                          {                          {
311                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
312                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
313                                  show_top10 = 0;                                  loop = 0;
314                                  return 0;                                  break;
315                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
316                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
317                                  {                                  {
318                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
319                                          show_top10 = 0;                                          loop = 0;
320                                          return 0;                                          break;
321                                  }                                  }
322                                  continue;                                  continue;
323                          case CR:                          case CR:
# Line 317  int show_top10_menu(void *param) Line 325  int show_top10_menu(void *param)
325                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
326                                  {                                  {
327                                  case EXITMENU:                                  case EXITMENU:
328                                          ch = EXITMENU;                                          loop = 0;
329                                          break;                                          break;
330                                  case REDRAW:                                  case REDRAW:
331                                          clearscr();                                          clearscr();
# Line 330  int show_top10_menu(void *param) Line 338  int show_top10_menu(void *param)
338                                          break;                                          break;
339                                  }                                  }
340                          }                          }
   
                         if (ch == EXITMENU)  
                         {  
                                 break;  
                         }  
341                  }                  }
342          }          }
343    


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

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