From 5a6f3131fdf4f4b85cf85709d3813068d4985b65 Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 22 Sep 2009 14:38:23 +0000 Subject: * to preven non-registered user getting money/post from free boards git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4878 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mbbsd/bbs.c') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 6ed0d512..9c0f88dd 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1059,9 +1059,13 @@ do_general(int garbage) money = MAX_POST_MONEY; #endif - // drop money & numposts for free boards + // drop money & numposts for free boards, or user without login information + // (they may post on free boards like SYSOP) // including: special boards (e.g. TEST, ALLPOST), bad boards, no BM boards - if (IsFreeBoardName(currboard) || (currbrdattr&BRD_BAD) || bp->BM[0] < ' ') + if (!HasUserPerm(PERM_LOGINOK) || + IsFreeBoardName(currboard) || + (currbrdattr&BRD_BAD) || + bp->BM[0] < ' ') // XXX note: BM may contain some (chinese) text that is not userid { money = 0; } -- cgit v1.2.3