summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-28 22:04:56 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-28 22:04:56 +0800
commitdd4d1039f0a32c984d595371079ae769d8af9217 (patch)
tree8878ad9d860bd8f0d1722525fd8b40d8afb1915a
parent45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3 (diff)
downloadpttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar.gz
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar.bz2
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar.lz
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar.xz
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.tar.zst
pttbbs-dd4d1039f0a32c984d595371079ae769d8af9217.zip
make check_cooldown work for recommendation
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3217 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index d3382389..f5423fd3 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2131,15 +2131,6 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
return FULLUPDATE;
}
- if (bp->brdattr & BRD_NOFASTRECMD)
- {
- int d = (int)bp->fastrecommend_pause - (now - lastrecommend);
- if (d > 0)
- {
- vmsgf("本板禁止快速連續推文,請再等 %d 秒", d);
- return FULLUPDATE;
- }
- }
#ifdef SAFE_ARTICLE_DELETE
if (fhdr->filename[0] == '.') {
vmsg("本文已刪除");
@@ -2151,6 +2142,21 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
return do_bid(ent, fhdr, bp, direct, ptime);
}
+ if (bp->brdattr & BRD_NOFASTRECMD)
+ {
+ int d = (int)bp->fastrecommend_pause - (now - lastrecommend);
+ if (d > 0)
+ {
+ vmsgf("本板禁止快速連續推文,請再等 %d 秒", d);
+ return FULLUPDATE;
+ }
+ }
+
+#ifdef USE_COOLDOWN
+ if(check_cooldown(bp))
+ return FULLUPDATE;
+#endif
+
type = 0;
move(b_lines, 0); clrtoeol();
@@ -3221,7 +3227,7 @@ int check_cooldown(boardheader_t *bp)
vmsgf("冷靜一下吧! (限制 %d 分 %d 秒)", diff/60, diff%60);
return 1;
}
- else if(posttimesof(usernum)==15)
+ else if(posttimesof(usernum)==0xf)
{
vmsgf("對不起,您被設劣文! (限制 %d 分 %d 秒)", diff/60, diff%60);
return 1;