diff options
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 54 | ||||
-rw-r--r-- | pttbbs/mbbsd/edit.c | 38 | ||||
-rw-r--r-- | pttbbs/mbbsd/mail.c | 34 | ||||
-rw-r--r-- | pttbbs/mbbsd/register.c | 6 | ||||
-rw-r--r-- | pttbbs/mbbsd/var.c | 3 |
5 files changed, 6 insertions, 129 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index 6b3a8d0e..8d239c48 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -2068,23 +2068,8 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct) } #endif // USE_AUTOCPLOG -#ifdef USE_POSTRECORD - if (postrecord.times > 0) { - outs(ANSI_COLOR(1;31) -"請注意: 1.在不同看板多次重覆發表或轉錄相似內容之文章,屬 Cross-post(CP)違規\n" -" 一般而言(詳見各站規板規)連原文共超過四篇就可能會被檢舉。\n" -" 2.被檢舉 Cross-post 時,分身帳號或不同ID但上線位址(IP)相同者\n" -" 會被一併計算、處分,開罰單後停權\n" -" 3.一旦判定CP屬實,七天內所有文章(包含其它無關的文章)都會被系統刪除\n" -"\n" ANSI_RESET ANSI_COLOR(1;33) -"若有緊急狀況或是特別需求,請寫信給各看板板主請他「幫你轉文」。注意:板主有權\n" -" 拒絕,且是要「板主動手轉文」不是問完後自己轉,不然一樣視為CP\n" -"\n" ANSI_RESET ANSI_COLOR(1;32) -"另外若是網宣的需求,除了尋求板主協助外,還可用下列方式:\n" -" 1. 至 Note 看板投稿動態看板或申請進站活動廣告\n" -" 2. 系所或社團活動可至 ZACTION / ZCLUB 發文\n" - "\n" ANSI_RESET); - } +#ifdef LOCAL_ALERT_CROSSPOST + LOCAL_ALERT_CROSSPOST(); #endif move(1, 0); @@ -2121,23 +2106,6 @@ 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]) - { - if (xbid == postrecord.last_bid) - { - vmsg("這篇文章已經轉錄過了。"); - return FULLUPDATE; - } - else if (postrecord.times >= MAX_CROSSNUM) - { - anticrosspost(); - return FULLUPDATE; - } - } -#endif - #ifdef USE_COOLDOWN if(check_cooldown(getbcache(xbid))) { vmsg("該看板現在無法轉錄。"); @@ -2303,24 +2271,6 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct) "此篇為板主轉錄,不自動檢查CP(但請小心誤觸人工檢舉)\n" ANSI_RESET); #endif -#ifdef USE_POSTRECORD - } else if (!HasUserPerm(PERM_ADMIN | PERM_MANAGER) && - hashPost == postrecord.checksum[0]) - // && xbid != postrecord.last_bid) - { - ++postrecord.times; // check will be done next time. - - if (postrecord.times +1 >= MAX_CROSSNUM) - { - outs(ANSI_COLOR(1;31) " 警告: 即將達到轉錄次數上限," - "之後可能開罰單!\n" ANSI_RESET); - } - } else { - // reset cross-post record - postrecord.times = 0; - postrecord.last_bid = xbid; - postrecord.checksum[0] = hashPost; -#endif } clrtobot(); diff --git a/pttbbs/mbbsd/edit.c b/pttbbs/mbbsd/edit.c index febbad83..d3a5c104 100644 --- a/pttbbs/mbbsd/edit.c +++ b/pttbbs/mbbsd/edit.c @@ -1892,9 +1892,6 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN] char ans[TTLEN], *msg; int aborted = 0, line = 0; int entropy = 0; -#ifdef USE_POSTRECORD - int checksum[3], sum = 0, po = 1; -#endif int upload = (flags & EDITFLAG_UPLOAD) ? 1 : 0; int chtitle = (flags & EDITFLAG_ALLOWTITLE) ? 1 : 0; @@ -2018,27 +2015,6 @@ 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); - if (msgsum) { - if (postrecord.last_bid != currbid && - postrecord.checksum[po] == msgsum) { - po++; - if (po > 3) { - postrecord.times++; - postrecord.last_bid = currbid; - po = 0; - } - } else - po = 1; - if (line >= curr_buf->totaln / 2 && sum < 3) { - checksum[sum++] = msgsum; - } - } - } -#endif #ifdef USE_POST_ENTROPY // calculate the real content of msg if (entropy < ENTROPY_MAX) @@ -2052,20 +2028,6 @@ 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 && - !is_hidden_board_friend(currbid, currutmp->uid)) - anticrosspost(); - - if (po && sum == 3) { - memcpy(&postrecord.checksum[1], checksum, sizeof(int) * 3); - if(postrecord.last_bid != currbid) - postrecord.times = 0; - } -#endif - *pentropy = entropy; if (aborted) return aborted; diff --git a/pttbbs/mbbsd/mail.c b/pttbbs/mbbsd/mail.c index d02bb0eb..d703dde1 100644 --- a/pttbbs/mbbsd/mail.c +++ b/pttbbs/mbbsd/mail.c @@ -1877,14 +1877,14 @@ mail_cross_post(int unused_arg GCC_UNUSED, fileheader_t * fhdr, move(2, 0); clrtoeol(); -#ifdef USE_POSTRECORD - if (postrecord.times > 1) + + if (1) { outs(ANSI_COLOR(1;31) "請注意: 若過量重複轉錄將視為洗板,導致被開罰單停權。\n" ANSI_RESET - "若有特別需求請洽各板主,請他們幫你轉文。\n\n"); + "若有特別需求請洽各板主,請他們「幫你轉文」(不是自己轉)。\n\n"); } -#endif + move(1, 0); CompleteBoard("轉錄本文章於看板:", xboard); @@ -1897,32 +1897,6 @@ mail_cross_post(int unused_arg GCC_UNUSED, fileheader_t * fhdr, xbid = getbnum(xboard); assert(0<=xbid-1 && xbid-1<MAX_BOARD); -#ifdef USE_POSTRECORD - // XXX 板主常會把一系列文章轉回自己看板 - if (is_BM_cache(xbid)) { -#ifdef NOTIFY_BM_CP_IGNORE - // ignore cross-post for BM - move(1, 0); SOLVE_ANSI_CACHE(); - prints("板主轉錄(不自動檢查CP)至看板: %s\n", xboard); -#endif - } else { - // process and determine 'cross-post' - - int hash = StringHash(fhdr->title); - - /* 同樣 title 不管對哪個板都算 cross post , 所以不用檢查 author */ - if ((hash != 0 && hash == postrecord.checksum[0])) { - /* 檢查 cross post 次數 */ - if (postrecord.times++ > MAX_CROSSNUM) - anticrosspost(); - } else { - postrecord.times = 0; - postrecord.last_bid = 0; - postrecord.checksum[0] = hash; - } - } -#endif - if (!CheckPostRestriction(xbid)) { vmsg("未達該看板發文條件限制 (可在該看板內按 i 查看限制)"); diff --git a/pttbbs/mbbsd/register.c b/pttbbs/mbbsd/register.c index 18e2315d..40926e53 100644 --- a/pttbbs/mbbsd/register.c +++ b/pttbbs/mbbsd/register.c @@ -1631,12 +1631,6 @@ regform_reject(const char *userid, const char *reason, const RegformEntry *pre) if(pre) print_regform_entry_localized(pre, fp); fprintf(fp, "%s 註冊失敗。\n", Cdate(&now)); - - // prompt user for how to contact if they have problem - // (deprecated because we allow direct reply now) - // fprintf(fp, ANSI_COLOR(1;31) "如有任何問題或需要與站務人員聯絡請至" - // BN_ID_PROBLEM "看板。" ANSI_RESET "\n"); - // multiple abbrev loop regform_print_reasons(reason, fp); fprintf(fp, "--\n"); diff --git a/pttbbs/mbbsd/var.c b/pttbbs/mbbsd/var.c index 424d9c3d..13a07471 100644 --- a/pttbbs/mbbsd/var.c +++ b/pttbbs/mbbsd/var.c @@ -143,9 +143,6 @@ 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; |