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

Diff of /lbbs/src/user_priv.c

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

Revision 1.22 by sysadm, Fri Oct 24 02:07:01 2025 UTC Revision 1.23 by sysadm, Tue Nov 4 13:49:51 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                                    user_priv.c  -  description  /*
3                                                           -------------------   * user_priv
4          Copyright            : (C) 2004-2025 by Leaflet   *   - basic operations of user privilege
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * 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 3 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
8    
9  #include "bbs.h"  #include "bbs.h"
10  #include "common.h"  #include "common.h"
# Line 66  int setpriv(BBS_user_priv *p_priv, int s Line 58  int setpriv(BBS_user_priv *p_priv, int s
58                  return 0;                  return 0;
59          }          }
60    
61          if (search_priv(p_priv, sid, &offset)) //found          if (search_priv(p_priv, sid, &offset)) // found
62          {          {
63                  p_priv->s_priv_list[offset].s_priv = priv;                  p_priv->s_priv_list[offset].s_priv = priv;
64                  p_priv->s_priv_list[offset].is_favor = is_favor;                  p_priv->s_priv_list[offset].is_favor = is_favor;
# Line 98  int getpriv(BBS_user_priv *p_priv, int s Line 90  int getpriv(BBS_user_priv *p_priv, int s
90  {  {
91          int offset;          int offset;
92    
93          if (search_priv(p_priv, sid, &offset)) //found          if (search_priv(p_priv, sid, &offset)) // found
94          {          {
95                  *p_is_favor = p_priv->s_priv_list[offset].is_favor;                  *p_is_favor = p_priv->s_priv_list[offset].is_favor;
96                  return p_priv->s_priv_list[offset].s_priv;                  return p_priv->s_priv_list[offset].s_priv;


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

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