diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-07-25 23:17:18 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-07-25 23:17:18 +0800 |
commit | e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde (patch) | |
tree | 1ba549a3702ad232a795c1527ef73fdf274eebe5 /mbbsd/voteboard.c | |
parent | 540472d231db4088e050b32737dee45f3ed07235 (diff) | |
download | pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar.gz pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar.bz2 pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar.lz pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar.xz pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.tar.zst pttbbs-e8b7db8875e3cba60b0ec8742b0cb7cc63c0bbde.zip |
add badposts as post/vote limit
show post limits on board config
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3386 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/voteboard.c')
-rw-r--r-- | mbbsd/voteboard.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c index b85253aa..6a79a46a 100644 --- a/mbbsd/voteboard.c +++ b/mbbsd/voteboard.c @@ -24,10 +24,12 @@ do_voteboardreply(const fileheader_t * fhdr) vmsg("對不起,您目前無法在此發表文章!"); return; } - if ( cuser.numlogins < ((unsigned int)(fhdr->multi.vote_limits.logins) * 10) || + if (cuser.firstlogin > (now - (time4_t)fhdr->multi.vote_limits.regtime * 2592000) || + cuser.badpost > ((unsigned int)(fhdr->multi.vote_limits.badpost)) || + cuser.numlogins < ((unsigned int)(fhdr->multi.vote_limits.logins) * 10) || cuser.numposts < ((unsigned int)(fhdr->multi.vote_limits.posts) * 10) ) { move(5, 10); - vmsg("你的上站數/文章數不足喔!"); + vmsg("你不夠資深喔!"); return; } setbpath(fpath, currboard); @@ -166,6 +168,7 @@ do_voteboard(int type) return FULLUPDATE; } if ( cuser.firstlogin > (now - (time4_t)bcache[currbid - 1].vote_limit_regtime * 2592000) || + cuser.badpost > ((unsigned int)(bcache[currbid - 1].vote_limit_badpost)) || cuser.numlogins < ((unsigned int)(bcache[currbid - 1].vote_limit_logins) * 10) || cuser.numposts < ((unsigned int)(bcache[currbid - 1].vote_limit_posts) * 10) ) { move(5, 10); @@ -350,6 +353,7 @@ do_voteboard(int type) votefile.multi.vote_limits.regtime = bcache[currbid - 1].vote_limit_regtime; votefile.multi.vote_limits.logins = bcache[currbid - 1].vote_limit_logins; votefile.multi.vote_limits.posts = bcache[currbid - 1].vote_limit_posts; + votefile.multi.vote_limits.badpost = bcache[currbid - 1].vote_limit_badpost; setbdir(genbuf, currboard); if (append_record(genbuf, &votefile, sizeof(votefile)) != -1) setbtotal(currbid); |