/[LeafOK_CVS]/lbbs/include/login.h
ViewVC logotype

Diff of /lbbs/include/login.h

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

Revision 1.2 by sysadm, Sun May 4 14:54:55 2025 UTC Revision 1.14 by sysadm, Tue Nov 4 13:49:50 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                                    login.h  -  description  /*
3                                                           -------------------   * login
4          begin                : Wed Mar 16 2004   *   - user authentication and online status manager
5          copyright            : (C) 2005 by Leaflet   *
6          email                : leaflet@leafok.com   * Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com>
7   ***************************************************************************/   */
   
 /***************************************************************************  
  *                                                                         *  
  *   This program is free software; you can redistribute it and/or modify  *  
  *   it under the terms of the GNU General Public License as published by  *  
  *   the Free Software Foundation; either version 2 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
8    
9  #ifndef _LOGIN_H_  #ifndef _LOGIN_H_
10  #define _LOGIN_H_  #define _LOGIN_H_
11    
12  #include <mysql.h>  #include <mysql/mysql.h>
13    
14  extern void login_fail();  #define BBS_login_retry_times 3
15    #define BBS_allowed_login_failures_within_interval 10
16    #define BBS_login_failures_count_interval 10 // minutes
17    #define BBS_allowed_login_failures_per_account 3
18    
19  extern int bbs_login();  extern void login_fail(void);
20    
21  extern int check_user(MYSQL *db, char *username, char *password);  extern int bbs_login(void);
22    
23  extern int load_user_info(MYSQL *db, long int BBS_uid);  extern int check_user(const char *username, const char *password);
24    
25  extern int load_guest_info(MYSQL *db);  extern int load_user_info(MYSQL *db, int BBS_uid);
26    
27  extern int user_online_add(MYSQL *db);  extern int load_guest_info(void);
28    
29    extern int user_online_add(MYSQL *db);
30  extern int user_online_del(MYSQL *db);  extern int user_online_del(MYSQL *db);
31    extern int user_online_exp(MYSQL *db);
32    
33    extern int user_online_update(const char *action);
34    
35  #endif //_LOGIN_H_  #endif //_LOGIN_H_


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

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