/[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.41 by sysadm, Sat May 10 15:32:36 2025 UTC
# Line 44  int bbs_exit() Line 44  int bbs_exit()
44  {  {
45          display_file_ex(DATA_GOODBYE, 1, 0);          display_file_ex(DATA_GOODBYE, 1, 0);
46    
         sleep(1);  
   
47          return 0;          return 0;
48  }  }
49    
50  int bbs_center()  int bbs_center()
51  {  {
52          int ch, redraw;          int ch;
53          time_t t_last_action;          time_t t_last_action;
54    
55          BBS_last_access_tm = t_last_action = time(0);          BBS_last_access_tm = t_last_action = time(0);
# Line 63  int bbs_center() Line 61  int bbs_center()
61          show_bottom("");          show_bottom("");
62          display_menu(get_menu(&bbs_menu, "TOPMENU"));          display_menu(get_menu(&bbs_menu, "TOPMENU"));
63    
64          while (!SYS_exit)          while (!SYS_server_exit)
65          {          {
66                  ch = igetch(0);                  ch = igetch(0);
67    
# Line 77  int bbs_center() Line 75  int bbs_center()
75                  switch (ch)                  switch (ch)
76                  {                  {
77                  case KEY_NULL:                  case KEY_NULL:
                         return 0;  
78                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
79                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(0) - BBS_last_access_tm >= MAX_DELAY_TIME)
80                          {                          {
81                                  return -1;                                  return 0;
82                          }                          }
83                          continue;                          continue;
84                  default:                  default:
                         redraw = 1;  
85                          switch (menu_control(&bbs_menu, ch))                          switch (menu_control(&bbs_menu, ch))
86                          {                          {
87                          case EXITBBS:                          case EXITBBS:
88                                  return 0;                                  return 0;
89                          case REDRAW:                          case REDRAW:
                                 break;  
                         case NOREDRAW:  
                         case UNKNOWN_CMD:  
                         default:  
                                 redraw = 0;  
                                 break;  
                         }  
                         if (redraw)  
                         {  
90                                  clearscr();                                  clearscr();
91                                  show_top("");                                  show_top("");
92                                  show_active_board();                                  show_active_board();
93                                  show_bottom("");                                  show_bottom("");
94                                  display_current_menu(&bbs_menu);                                  display_current_menu(&bbs_menu);
95                                    break;
96                            case NOREDRAW:
97                            case UNKNOWN_CMD:
98                            default:
99                                    break;
100                          }                          }
101                  }                  }
102                  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