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

Diff of /lbbs/src/login.c

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

Revision 1.77 by sysadm, Fri Dec 26 11:17:41 2025 UTC Revision 1.80 by sysadm, Sun Jan 4 13:24:00 2026 UTC
# Line 3  Line 3 
3   * login   * login
4   *   - user authentication and online status manager   *   - user authentication and online status manager
5   *   *
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2026  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
# Line 46  int bbs_login(void) Line 46  int bbs_login(void)
46    
47          for (i = 0; !SYS_server_exit && i < BBS_login_retry_times; i++)          for (i = 0; !SYS_server_exit && i < BBS_login_retry_times; i++)
48          {          {
49                    clrtoeol();
50                  prints("\033[1;33m请输入帐号\033[m(试用请输入`\033[1;36mguest\033[m', "                  prints("\033[1;33m请输入帐号\033[m(试用请输入`\033[1;36mguest\033[m', "
51                             "注册请输入`\033[1;31mnew\033[m'): ");                             "注册请输入`\033[1;31mnew\033[m'): ");
52                  iflush();                  iflush();
# Line 70  int bbs_login(void) Line 71  int bbs_login(void)
71    
72                  if (username[0] != '\0')                  if (username[0] != '\0')
73                  {                  {
74                            clrtoeol();
75                          prints("\033[1;37m请输入密码\033[m: ");                          prints("\033[1;37m请输入密码\033[m: ");
76                          iflush();                          iflush();
77    
# Line 393  int check_user(const char *username, con Line 395  int check_user(const char *username, con
395                  tzset();                  tzset();
396          }          }
397    
         log_common("User [%s] authenticated successfully", username);  
   
398  cleanup:  cleanup:
399          mysql_free_result(rs);          mysql_free_result(rs);
400          mysql_close(db);          mysql_close(db);


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

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