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

Diff of /lbbs/src/bbs_main.c

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

Revision 1.36 by sysadm, Tue May 6 05:31:26 2025 UTC Revision 1.40 by sysadm, Sat May 10 14:37:04 2025 UTC
# Line 51  int bbs_exit() Line 51  int bbs_exit()
51    
52  int bbs_center()  int bbs_center()
53  {  {
54          int ch, redraw;          int ch;
55          time_t t_last_action;          time_t t_last_action;
56    
57          BBS_last_access_tm = t_last_action = time(0);          BBS_last_access_tm = t_last_action = time(0);
# Line 63  int bbs_center() Line 63  int bbs_center()
63          show_bottom("");          show_bottom("");
64          display_menu(get_menu(&bbs_menu, "TOPMENU"));          display_menu(get_menu(&bbs_menu, "TOPMENU"));
65    
66          while (!SYS_exit)          while (!SYS_server_exit)
67          {          {
68                  ch = igetch(0);                  ch = igetch(0);
69    
# Line 77  int bbs_center() Line 77  int bbs_center()
77                  switch (ch)                  switch (ch)
78                  {                  {
79                  case KEY_NULL:                  case KEY_NULL:
                         return 0;  
80                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
81                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)
82                          {                          {
83                                  return -1;                                  return 0;
84                          }                          }
85                          continue;                          continue;
86                  default:                  default:
                         redraw = 1;  
87                          switch (menu_control(&bbs_menu, ch))                          switch (menu_control(&bbs_menu, ch))
88                          {                          {
89                          case EXITBBS:                          case EXITBBS:
90                                  return 0;                                  return 0;
91                          case REDRAW:                          case REDRAW:
                                 break;  
                         case NOREDRAW:  
                         case UNKNOWN_CMD:  
                         default:  
                                 redraw = 0;  
                                 break;  
                         }  
                         if (redraw)  
                         {  
92                                  clearscr();                                  clearscr();
93                                  show_top("");                                  show_top("");
94                                  show_active_board();                                  show_active_board();
95                                  show_bottom("");                                  show_bottom("");
96                                  display_current_menu(&bbs_menu);                                  display_current_menu(&bbs_menu);
97                                    break;
98                            case NOREDRAW:
99                            case UNKNOWN_CMD:
100                            default:
101                                    break;
102                          }                          }
103                  }                  }
104                  BBS_last_access_tm = time(0);                  BBS_last_access_tm = time(0);


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

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