/[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.37 by sysadm, Tue Oct 14 06:27:44 2025 UTC Revision 1.40 by sysadm, Fri Oct 17 12:23:01 2025 UTC
# Line 110  int copyright(void *param) Line 110  int copyright(void *param)
110          return REDRAW;          return REDRAW;
111  }  }
112    
113    int version(void *param)
114    {
115            display_file(DATA_VERSION, 1);
116    
117            return REDRAW;
118    }
119    
120  int reload_bbs_conf(void *param)  int reload_bbs_conf(void *param)
121  {  {
122          clearscr();          clearscr();
# Line 237  int show_top10_menu(void *param) Line 244  int show_top10_menu(void *param)
244                  return NOREDRAW;                  return NOREDRAW;
245          }          }
246          show_top10 = 1;          show_top10 = 1;
247            
248          clearscr();          clearscr();
249          show_top("", BBS_name, "");          show_top("", BBS_name, "");
250          show_bottom("");          show_bottom("");
# Line 248  int show_top10_menu(void *param) Line 255  int show_top10_menu(void *param)
255                  {                  {
256                          iflush();                          iflush();
257                          ch = igetch(100);                          ch = igetch(100);
258    
259                            if (ch != KEY_NULL && ch != KEY_TIMEOUT)
260                            {
261                                    BBS_last_access_tm = time(NULL);
262                            }
263    
264                          switch (ch)                          switch (ch)
265                          {                          {
266                          case KEY_NULL: // broken pipe                          case KEY_NULL: // broken pipe
267                                    log_error("KEY_NULL\n");
268                                  show_top10 = 0;                                  show_top10 = 0;
269                                  return 0;                                  return 0;
270                          case KEY_TIMEOUT:                          case KEY_TIMEOUT:
271                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                                  if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
272                                  {                                  {
273                                            log_error("User input timeout\n");
274                                          show_top10 = 0;                                          show_top10 = 0;
275                                          return 0;                                          return 0;
276                                  }                                  }
277                                  continue;                                  continue;
278                          case CR:                          case CR:
                                 igetch_reset();  
279                          default:                          default:
280                                  switch (menu_control(&top10_menu, ch))                                  switch (menu_control(&top10_menu, ch))
281                                  {                                  {
# Line 280  int show_top10_menu(void *param) Line 294  int show_top10_menu(void *param)
294                                  }                                  }
295                          }                          }
296    
                         BBS_last_access_tm = time(NULL);  
   
297                          if (ch == EXITMENU)                          if (ch == EXITMENU)
298                          {                          {
299                                  break;                                  break;
300                          }                          }
301                  }                  }
302          }          }
303            
304          show_top10 = 0;          show_top10 = 0;
305          return REDRAW;          return REDRAW;
306  }  }


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

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