/[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.34 by sysadm, Sat May 3 14:50:59 2025 UTC Revision 1.35 by sysadm, Sun May 4 14:54:55 2025 UTC
# Line 21  Line 21 
21  #include "login.h"  #include "login.h"
22  #include "user_priv.h"  #include "user_priv.h"
23  #include "common.h"  #include "common.h"
24    #include "database.h"
25  #include "log.h"  #include "log.h"
26  #include "io.h"  #include "io.h"
27  #include "screen.h"  #include "screen.h"
# Line 42  int bbs_info() Line 43  int bbs_info()
43    
44  int bbs_exit()  int bbs_exit()
45  {  {
46          char temp[256];          display_file_ex(DATA_GOODBYE, 1, 0);
   
         strcpy(temp, app_home_dir);  
         strcat(temp, "data/goodbye.txt");  
         display_file_ex(temp, 1, 0);  
47    
48          sleep(1);          sleep(1);
49    
# Line 55  int bbs_exit() Line 52  int bbs_exit()
52    
53  int bbs_center()  int bbs_center()
54  {  {
55          int ch, result, redraw;          int ch, redraw;
         char temp[256];  
56          time_t t_last_action;          time_t t_last_action;
57    
58          BBS_last_access_tm = t_last_action = time(0);          BBS_last_access_tm = t_last_action = time(0);
# Line 120  int bbs_center() Line 116  int bbs_center()
116    
117  int bbs_main()  int bbs_main()
118  {  {
         char temp[256];  
119          int ret;          int ret;
120    
121          set_input_echo(0);          set_input_echo(0);
# Line 139  int bbs_main() Line 134  int bbs_main()
134          clearscr();          clearscr();
135    
136          // BBS Top 10          // BBS Top 10
137          strcpy(temp, app_home_dir);          display_file_ex("./var/bbs_top.txt", 1, 1);
         strcat(temp, "var/bbs_top.txt");  
         display_file_ex(temp, 1, 1);  
138    
139          // Main          // Main
140          bbs_center();          bbs_center();
# Line 150  int bbs_main() Line 143  int bbs_main()
143          bbs_exit();          bbs_exit();
144          log_std("User logout\n");          log_std("User logout\n");
145    
146            MYSQL *db = db_open();
147            if (db == NULL)
148            {
149                    return -1;
150            }
151    
152            user_online_del(db);
153    
154            mysql_close(db);
155    
156          return 0;          return 0;
157  }  }


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

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