/[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.53 by sysadm, Fri Nov 21 07:56:00 2025 UTC Revision 1.59 by sysadm, Wed Dec 17 03:47:00 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    #ifdef _DEBUG
318                                  log_error("KEY_NULL\n");                                  log_error("KEY_NULL\n");
319                                  show_top10 = 0;  #endif
320                                  return 0;                                  loop = 0;
321                                    break;
322                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
323                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)                                  if (time(NULL) - BBS_last_access_tm >= BBS_max_user_idle_time)
324                                  {                                  {
325                                          log_error("User input timeout\n");                                          log_error("User input timeout\n");
326                                          show_top10 = 0;                                          loop = 0;
327                                          return 0;                                          break;
328                                  }                                  }
329                                  continue;                                  continue;
330                          case CR:                          case CR:
# Line 317  int show_top10_menu(void *param) Line 332  int show_top10_menu(void *param)
332                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
333                                  {                                  {
334                                  case EXITMENU:                                  case EXITMENU:
335                                          ch = EXITMENU;                                          loop = 0;
336                                          break;                                          break;
337                                  case REDRAW:                                  case REDRAW:
338                                          clearscr();                                          clearscr();
# Line 330  int show_top10_menu(void *param) Line 345  int show_top10_menu(void *param)
345                                          break;                                          break;
346                                  }                                  }
347                          }                          }
   
                         if (ch == EXITMENU)  
                         {  
                                 break;  
                         }  
348                  }                  }
349          }          }
350    


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

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