| 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 Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
| 8 |
/*************************************************************************** |
|
| 9 |
* * |
#ifdef HAVE_CONFIG_H |
| 10 |
* This program is free software; you can redistribute it and/or modify * |
#include "config.h" |
| 11 |
* it under the terms of the GNU General Public License as published by * |
#endif |
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 12 |
|
|
| 13 |
#include "bbs.h" |
#include "bbs.h" |
| 14 |
#include "common.h" |
#include "common.h" |
| 62 |
return 0; |
return 0; |
| 63 |
} |
} |
| 64 |
|
|
| 65 |
if (search_priv(p_priv, sid, &offset)) //found |
if (search_priv(p_priv, sid, &offset)) // found |
| 66 |
{ |
{ |
| 67 |
p_priv->s_priv_list[offset].s_priv = priv; |
p_priv->s_priv_list[offset].s_priv = priv; |
| 68 |
p_priv->s_priv_list[offset].is_favor = is_favor; |
p_priv->s_priv_list[offset].is_favor = is_favor; |
| 94 |
{ |
{ |
| 95 |
int offset; |
int offset; |
| 96 |
|
|
| 97 |
if (search_priv(p_priv, sid, &offset)) //found |
if (search_priv(p_priv, sid, &offset)) // found |
| 98 |
{ |
{ |
| 99 |
*p_is_favor = p_priv->s_priv_list[offset].is_favor; |
*p_is_favor = p_priv->s_priv_list[offset].is_favor; |
| 100 |
return p_priv->s_priv_list[offset].s_priv; |
return p_priv->s_priv_list[offset].s_priv; |