summaryrefslogtreecommitdiffstats
path: root/include/perm.h
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-10 21:18:07 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-10 21:18:07 +0800
commitb9d50d84ccc8c070c7e38f2a9dcd1f3bb5641df5 (patch)
treee8272b4de36a873e61c40473f3b7c7a077b0500d /include/perm.h
parentf63fd767f682e9eb4d5a2ca37c5884e4a5441b12 (diff)
downloadpttbbs-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/perm.h')
-rw-r--r--include/perm.h11
1 files changed, 11 insertions, 0 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