/[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.78 by sysadm, Mon Oct 13 00:46:03 2025 UTC Revision 1.82 by sysadm, Thu Oct 16 11:26:16 2025 UTC
# Line 181  int bbs_logout(void) Line 181  int bbs_logout(void)
181                  return -1;                  return -1;
182          }          }
183    
184          if (user_online_del(db) < 0)          if (user_online_exp(db) < 0)
185          {          {
186                  return -2;                  return -2;
187          }          }
188    
189            if (user_online_del(db) < 0)
190            {
191                    return -3;
192            }
193    
194          mysql_close(db);          mysql_close(db);
195    
196          display_file(DATA_GOODBYE, 1);          display_file(DATA_GOODBYE, 1);
197    
198          log_common("User logout\n");          log_common("User [%s] logout\n", BBS_username);
199    
200          return 0;          return 0;
201  }  }
# Line 214  int bbs_center() Line 219  int bbs_center()
219          {          {
220                  ch = igetch(100);                  ch = igetch(100);
221    
222            if (ch != KEY_NULL && ch != KEY_TIMEOUT)
223            {
224                BBS_last_access_tm = time(NULL);
225            }
226    
227                  if (bbs_menu.choose_step == 0 && time(NULL) - t_last_action >= 10)                  if (bbs_menu.choose_step == 0 && time(NULL) - t_last_action >= 10)
228                  {                  {
229                          t_last_action = time(NULL);                          t_last_action = time(NULL);
# Line 232  int bbs_center() Line 242  int bbs_center()
242                  switch (ch)                  switch (ch)
243                  {                  {
244                  case KEY_NULL: // broken pipe                  case KEY_NULL: // broken pipe
245                            log_error("KEY_NULL\n");
246                          return 0;                          return 0;
247                  case KEY_TIMEOUT:                  case KEY_TIMEOUT:
248                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)                          if (time(NULL) - BBS_last_access_tm >= MAX_DELAY_TIME)
249                          {                          {
250                                    log_error("User input timeout\n");
251                                  return 0;                                  return 0;
252                          }                          }
253                          continue;                          continue;
# Line 262  int bbs_center() Line 274  int bbs_center()
274                          }                          }
275                          iflush();                          iflush();
276                  }                  }
   
                 BBS_last_access_tm = time(NULL);  
277          }          }
278    
279          return 0;          return 0;
# Line 389  cleanup: Line 399  cleanup:
399    
400          // Detach menu in shared memory          // Detach menu in shared memory
401          detach_menu_shm(&bbs_menu);          detach_menu_shm(&bbs_menu);
402            detach_menu_shm(&top10_menu);
403    
404          // Detach data pools shm          // Detach data pools shm
405          detach_section_list_shm();          detach_section_list_shm();


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

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