summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-09 00:18:04 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-09 00:18:04 +0800
commit085c9a93cf63c5511f28005deb06f8ba25c8b667 (patch)
tree2552708384e0221efed674c44ff03c83a4a54346 /mbbsd/mail.c
parent8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a (diff)
downloadpttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.gz
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.bz2
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.lz
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.xz
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.zst
pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.zip
add "cool down" feature for boards.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2582 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 5d4ba3b3..7d953388 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1053,6 +1053,15 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct)
return FULLUPDATE;
}
+#ifdef USE_COOLDOWN
+ if ( !((currmode & MODE_BOARD) || HAS_PERM(PERM_SYSOP)) &&
+ ((bcache[ent - 1].brdattr & BRD_COOLDOWN) && now < cooldowntimeof(usernum)) ) {
+ move(5, 10);
+ vmsg("冷靜一下吧!");
+ return FULLUPDATE;
+ }
+#endif
+
ent = 1;
if (HAS_PERM(PERM_SYSOP) || !strcmp(fhdr->owner, cuser.userid)) {
getdata(2, 0, "(1)原文轉載 (2)舊轉錄格式?[1] ",
@@ -1117,6 +1126,10 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct)
setbtotal(getbnum(xboard));
if (!xfile.filemode)
outgo_post(&xfile, xboard, cuser.userid, cuser.username);
+#ifdef USE_COOLDOWN
+ if (bcache[getbnum(xboard) - 1].brdattr & BRD_COOLDOWN)
+ add_cooldowntime(usernum, 5);
+#endif
cuser.numposts++;
vmsg("文章轉錄完成");
currmode = currmode0;