/[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.75 by sysadm, Wed Jun 25 01:50:14 2025 UTC Revision 1.78 by sysadm, Mon Oct 13 00:46:03 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
17    #include "article_favor.h"
18  #include "article_view_log.h"  #include "article_view_log.h"
19  #include "bbs.h"  #include "bbs.h"
20  #include "bbs_cmd.h"  #include "bbs_cmd.h"
# Line 38  Line 39 
39    
40  int bbs_info()  int bbs_info()
41  {  {
42          prints("ӭ \033[1;33m%s \033[32m[%s]  \033[37m( %s )\r\n",          prints("欢迎光临 \033[1;33m%s \033[32m[%s]  \033[37m( %s )\033[m\r\n",
43                     BBS_name, BBS_server, APP_INFO);                     BBS_name, BBS_server, APP_INFO);
44    
45          return iflush();          return iflush();
# Line 157  int bbs_welcome(void) Line 158  int bbs_welcome(void)
158          display_file(DATA_WELCOME, 2);          display_file(DATA_WELCOME, 2);
159    
160          // Display welcome message          // Display welcome message
161          prints("\r\033[1;35mӭ\033[33m %s \033[35mBBS\r\n"          prints("\r\033[1;35m欢迎光临\033[33m 【 %s 】 \033[35mBBS\r\n"
162                     "\033[32mĿǰվ [\033[36m%d/%d\033[32m] "                     "\033[32m目前上站人数 [\033[36m%d/%d\033[32m] "
163                     "ο[\033[36m%d\033[32m] "                     "匿名游客[\033[36m%d\033[32m] "
164                     "עû[\033[36m%d/%d\033[32m]\r\n"                     "注册用户数[\033[36m%d/%d\033[32m]\r\n"
165                     " [\033[36m%s\033[32m] ۼƷ˴Σ[\033[36m%d\033[32m]\033[m\r\n",                     "从 [\033[36m%s\033[32m] 起,累计访问人次:[\033[36m%d\033[32m]\033[m\r\n",
166                     BBS_name, u_online, BBS_max_client, u_anonymous, u_total,                     BBS_name, u_online, BBS_max_client, u_anonymous, u_total,
167                     BBS_max_user, BBS_start_dt, u_login_count);                     BBS_max_user, BBS_start_dt, u_login_count);
168    
# Line 323  int bbs_main() Line 324  int bbs_main()
324          // User login          // User login
325          if (SSH_v2)          if (SSH_v2)
326          {          {
327                  prints("\033[1m%s ӭʹsshʽ \033[1;33m...\033[m", BBS_username);                  prints("\033[1m%s 欢迎使用ssh方式访问 \033[1;33m按任意键继续...\033[m", BBS_username);
328                  iflush();                  iflush();
329                  igetch_t(MAX_DELAY_TIME);                  igetch_t(MAX_DELAY_TIME);
330          }          }
# Line 339  int bbs_main() Line 340  int bbs_main()
340                  goto cleanup;                  goto cleanup;
341          }          }
342    
343            // Load article favorite
344            if (article_favor_load(BBS_priv.uid, &BBS_article_favor, 0) < 0)
345            {
346                    log_error("article_favor_load() error\n");
347                    goto cleanup;
348            }
349    
350          // Init editor memory pool          // Init editor memory pool
351          if (editor_memory_pool_init() < 0)          if (editor_memory_pool_init() < 0)
352          {          {
# Line 363  int bbs_main() Line 371  int bbs_main()
371                  log_error("article_view_log_save_inc() error\n");                  log_error("article_view_log_save_inc() error\n");
372          }          }
373    
374            // Save incremental article favorite
375            if (article_favor_save_inc(&BBS_article_favor) < 0)
376            {
377                    log_error("article_favor_save_inc() error\n");
378            }
379    
380  cleanup:  cleanup:
381          // Cleanup editor memory pool          // Cleanup editor memory pool
382          editor_memory_pool_cleanup();          editor_memory_pool_cleanup();
# Line 370  cleanup: Line 384  cleanup:
384          // Unload article view log          // Unload article view log
385          article_view_log_unload(&BBS_article_view_log);          article_view_log_unload(&BBS_article_view_log);
386    
387            // Unload article favor
388            article_favor_unload(&BBS_article_favor);
389    
390          // Detach menu in shared memory          // Detach menu in shared memory
391          detach_menu_shm(&bbs_menu);          detach_menu_shm(&bbs_menu);
392    


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

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