--- lbbs/include/user_priv.h 2025/05/30 02:56:02 1.4 +++ lbbs/include/user_priv.h 2025/11/04 14:58:56 1.9 @@ -1,24 +1,16 @@ -/*************************************************************************** - user_priv.h - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ - -/*************************************************************************** - * * - * 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 3 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * user_priv + * - basic operations of user privilege + * + * Copyright (C) 2004-2025 Leaflet + */ #ifndef _USER_PRIV_H_ #define _USER_PRIV_H_ #include "bbs.h" -#include +#include // User privilege #define S_NONE 0x0 @@ -32,18 +24,18 @@ #define S_ALL 0xff #define S_DEFAULT 0x3 // 0x1 | 0x2 -#define P_GUEST 0x0 //游客 -#define P_USER 0x1 //普通用户 -//#define P_AUTH_USER 0x2 // Reserved -#define P_MAN_S 0x4 //副版主 -#define P_MAN_M 0x8 //正版主 -#define P_MAN_C 0x10 // Reserved -#define P_ADMIN_S 0x20 //副系统管理员 -#define P_ADMIN_M 0x40 //主系统管理员 +#define P_GUEST 0x0 // 娓稿 +#define P_USER 0x1 // 鏅氱敤鎴 +// #define P_AUTH_USER 0x2 // Reserved +#define P_MAN_S 0x4 // 鍓増涓 +#define P_MAN_M 0x8 // 姝g増涓 +#define P_MAN_C 0x10 // Reserved +#define P_ADMIN_S 0x20 // 鍓郴缁熺鐞嗗憳 +#define P_ADMIN_M 0x40 // 涓荤郴缁熺鐞嗗憳 struct user_priv { - long int uid; + int uid; int level; int g_priv; struct @@ -93,6 +85,6 @@ inline int is_favor(BBS_user_priv *p_pri return is_favor; } -extern int load_priv(MYSQL *db, BBS_user_priv *p_priv, long int uid); +extern int load_priv(MYSQL *db, BBS_user_priv *p_priv, int uid); #endif //_USER_PRIV_H_