From b9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5 Mon Sep 17 00:00:00 2001 From: in2 Date: Wed, 10 Mar 2004 13:18:07 +0000 Subject: HOTBOARDCACHE git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1584 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/perm.h | 11 +++++++++++ include/pttstruct.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3