summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-22 22:38:23 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-22 22:38:23 +0800
commit448e57ad694477008a9de930d30d948372198e87 (patch)
tree1fdee810cbcca39d40e6c57c81037cbd1f08b795
parent542aff354e48c545efacf5f320ac91a3fde3c26e (diff)
downloadpttbbs-448e57ad694477008a9de930d30d948372198e87.tar
pttbbs-448e57ad694477008a9de930d30d948372198e87.tar.gz
pttbbs-448e57ad694477008a9de930d30d948372198e87.tar.bz2
pttbbs-448e57ad694477008a9de930d30d948372198e87.tar.lz
pttbbs-448e57ad694477008a9de930d30d948372198e87.tar.xz
pttbbs-448e57ad694477008a9de930d30d948372198e87.tar.zst
pttbbs-448e57ad694477008a9de930d30d948372198e87.zip
* to preven non-registered user getting money/post from free boards
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4878 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index 6ed0d512..9c0f88dd 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/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;
}