diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-10 21:18:07 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-10 21:18:07 +0800 |
commit | b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5 (patch) | |
tree | e8272b4de36a873e61c40473f3b7c7a077b0500d /include | |
parent | f63fd767f682e9eb4d5a2ca37c5884e4a5441b12 (diff) | |
download | pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar.gz pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar.bz2 pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar.lz pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar.xz pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.tar.zst pttbbs-b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5.zip |
HOTBOARDCACHE
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1584 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r-- | include/perm.h | 11 | ||||
-rw-r--r-- | include/pttstruct.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/perm.h b/include/perm.h index bab82ae3..2d676bae 100644 --- a/include/perm.h +++ b/include/perm.h @@ -53,4 +53,15 @@ #define HAVE_PERM(x) (cuser.userlevel&(x)) #define PERM_HIDE(u) ((u)->userlevel & PERM_SYSOP && \ (u)->userlevel & PERM_DENYPOST) + +#define IS_BOARD(bptr) ((bptr)->brdname[0] && \ + !((bptr)->brdattr & BRD_GROUPBOARD)) +#define IS_GROUP(bptr) ((bptr)->brdname[0] && \ + ((bptr)->brdattr & BRD_GROUPBOARD)) + +#define IS_OPENBRD(bptr) \ + (!(((bptr)->brdattr & (BRD_HIDE | BRD_TOP)) || \ + ((bptr)->level && !((bptr)->brdattr & BRD_POSTMASK) && \ + ((bptr)->level & \ + ~(PERM_BASIC|PERM_CHAT|PERM_PAGE|PERM_POST|PERM_LOGINOK))))) #endif diff --git a/include/pttstruct.h b/include/pttstruct.h index 550b9437..34becd25 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -366,7 +366,7 @@ typedef struct { boardheader_t bcache[MAX_BOARD]; boardheader_t *bsorted[2][MAX_BOARD]; /* 0: by name 1: by class */ #if HOTBOARDCACHE - char nHOTs; + unsigned char nHOTs; boardheader_t *HBcache[HOTBOARDCACHE]; #endif #if DIRCACHESIZE |