summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index b7011872..638dd393 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1262,6 +1262,10 @@ mail_cross_post(int ent, fileheader_t * fhdr, const char *direct)
char genbuf[200];
char genbuf2[4];
+ if (!CheckPostPerm()) {
+ vmsg("對不起,您目前無法轉錄文章!");
+ return FULLUPDATE;
+ }
move(2, 0);
clrtoeol();
move(1, 0);
@@ -1269,6 +1273,20 @@ mail_cross_post(int ent, fileheader_t * fhdr, const char *direct)
if (*xboard == '\0' || !haspostperm(xboard))
return FULLUPDATE;
+ /* 借用變數 */
+ ent = StringHash(fhdr->title);
+ /* 同樣 title 不管對哪個板都算 cross post , 所以不用檢查 author */
+
+ if ((ent != 0 && ent == postrecord.checksum[0])) {
+ /* 檢查 cross post 次數 */
+ if (postrecord.times++ > MAX_CROSSNUM)
+ anticrosspost();
+ } else {
+ postrecord.times = 0;
+ postrecord.last_bid = 0;
+ postrecord.checksum[0] = ent;
+ }
+
ent = getbnum(xboard);
assert(0<=ent-1 && ent-1<MAX_BOARD);
if ( !(HasUserPerm(PERM_SYSOP)) &&