summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pttbbs/mbbsd/bbs.c6
-rw-r--r--pttbbs/mbbsd/edit.c4
-rw-r--r--pttbbs/mbbsd/mail.c4
-rw-r--r--pttbbs/mbbsd/var.c2
4 files changed, 16 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index 6624d6e6..64df3966 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/mbbsd/bbs.c
@@ -1882,11 +1882,13 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
}
#endif // USE_AUTOCPLOG
+#ifdef USE_POSTRECORD
if (postrecord.times > 1) {
outs(ANSI_COLOR(1;31)
"請注意: 若過量重複轉錄將視為洗板,導致被開罰單停權。\n" ANSI_RESET
"若有特別需求請洽各板主,請他們幫你轉文。\n\n");
}
+#endif
move(1, 0);
@@ -1922,6 +1924,7 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
return FULLUPDATE;
}
+#ifdef USE_POSTRECORD
// quick check: if already cross-posted, reject.
if (hashPost == postrecord.checksum[0])
{
@@ -1936,6 +1939,7 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
return FULLUPDATE;
}
}
+#endif
#ifdef USE_COOLDOWN
if(check_cooldown(getbcache(xbid)))
@@ -2098,6 +2102,7 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
// ignore BM for cross-posting.
outs(ANSI_COLOR(1;32) "此篇為板主轉錄,不自動檢查也不計入CP"
ANSI_RESET);
+#ifdef USE_POSTRECORD
} else if (hashPost == postrecord.checksum[0])
// && xbid != postrecord.last_bid)
{
@@ -2113,6 +2118,7 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct)
postrecord.times = 0;
postrecord.last_bid = xbid;
postrecord.checksum[0] = hashPost;
+#endif
}
pressanykey();
diff --git a/pttbbs/mbbsd/edit.c b/pttbbs/mbbsd/edit.c
index 5b14d31e..a508f047 100644
--- a/pttbbs/mbbsd/edit.c
+++ b/pttbbs/mbbsd/edit.c
@@ -1968,6 +1968,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN]
strip_ansi_movecmd(msg);
line++;
+#ifdef USE_POSTRECORD
/* check crosspost */
if (currstat == POSTING && po ) {
int msgsum = StringHash(msg);
@@ -1987,6 +1988,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN]
}
}
}
+#endif
#ifdef USE_POST_ENTROPY
// calculate the real content of msg
if (entropy < ENTROPY_MAX)
@@ -2000,6 +2002,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN]
}
curr_buf->currline = NULL;
+#ifdef USE_POSTRECORD
// what if currbid == 0? add currstat checking.
if (currstat == POSTING &&
postrecord.times > MAX_CROSSNUM-1 &&
@@ -2011,6 +2014,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN]
if(postrecord.last_bid != currbid)
postrecord.times = 0;
}
+#endif
*pentropy = entropy;
if (aborted)
diff --git a/pttbbs/mbbsd/mail.c b/pttbbs/mbbsd/mail.c
index 8c1c2199..021ccfeb 100644
--- a/pttbbs/mbbsd/mail.c
+++ b/pttbbs/mbbsd/mail.c
@@ -1515,12 +1515,14 @@ mail_cross_post(int unused_arg, fileheader_t * fhdr, const char *direct)
move(2, 0);
clrtoeol();
+#ifdef USE_POSTRECORD
if (postrecord.times > 1)
{
outs(ANSI_COLOR(1;31)
"請注意: 若過量重複轉錄將視為洗板,導致被開罰單停權。\n" ANSI_RESET
"若有特別需求請洽各板主,請他們幫你轉文。\n\n");
}
+#endif
move(1, 0);
CompleteBoard("轉錄本文章於看板:", xboard);
@@ -1533,6 +1535,7 @@ mail_cross_post(int unused_arg, fileheader_t * fhdr, const char *direct)
xbid = getbnum(xboard);
assert(0<=xbid-1 && xbid-1<MAX_BOARD);
+#ifdef USE_POSTRECORD
// XXX 板主常會把一系列文章轉回自己看板
if (is_BM_cache(xbid)) {
// ignore cross-post for BM
@@ -1554,6 +1557,7 @@ mail_cross_post(int unused_arg, fileheader_t * fhdr, const char *direct)
postrecord.checksum[0] = hash;
}
}
+#endif
if (!CheckPostRestriction(xbid))
{
diff --git a/pttbbs/mbbsd/var.c b/pttbbs/mbbsd/var.c
index 15df0e73..400ad1ff 100644
--- a/pttbbs/mbbsd/var.c
+++ b/pttbbs/mbbsd/var.c
@@ -109,7 +109,9 @@ pid_t currpid; /* current process ID */
time4_t login_start_time, last_login_time;
time4_t start_time;
userec_t pwcuser; /* current user structure */
+#ifdef USE_POSTRECORD
crosspost_t postrecord; /* anti cross post */
+#endif
unsigned int currbrdattr;
unsigned int currstat;