diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-31 00:01:07 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-31 00:01:07 +0800 |
commit | 22ec68d9372b9949ad05797cbda8e4a3c7f8fceb (patch) | |
tree | 617547ccb99fabc46212fb964e2e109cb3d4f308 | |
parent | fcb8968ae905a84c8956fced725eb89854bb6c5b (diff) | |
download | pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar.gz pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar.bz2 pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar.lz pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar.xz pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.tar.zst pttbbs-22ec68d9372b9949ad05797cbda8e4a3c7f8fceb.zip |
- bbs: check 'badpost' post restriction only if assess is enabled.
- bbs: prevent del_post demand incorrect money (if money > MAX_POST_MONEY)
- chicken: fix compile error
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4331 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 6 | ||||
-rw-r--r-- | mbbsd/chicken.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index c072c3bc..c3081637 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -387,8 +387,11 @@ int CheckPostRestriction(int bid) return 0; if (cuser.numposts / 10 < (unsigned int)bp->post_limit_posts) return 0; + +#ifdef ASSESS if (cuser.badpost > (255 - (unsigned int)bp->post_limit_badpost)) return 0; +#endif return 1; } @@ -3317,7 +3320,8 @@ del_post(int ent, fileheader_t * fhdr, char *direct) 0) fhdr->multi.money = 0; - if (fhdr->multi.money <= 0) + // XXX also check MAX_POST_MONEY in case any error results in bad money... + if (fhdr->multi.money <= 0 || fhdr->multi.money > MAX_POST_MONEY) { // no need to change user record } diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index bacddcf9..a409ce90 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -453,7 +453,8 @@ ch_hit(chicken_t *mychicken) pressanykey(); } -static void +//static +void ch_buyitem(int money, const char *picture, int *item, int haveticket) { int num = 0; |