summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-28 16:55:21 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-28 16:55:21 +0800
commit200c31914f7abaeb08d08eac45473585bf6f453b (patch)
tree1fc242cda9e172b5569daa62a1601ad5cb6cfde4 /mbbsd/bbs.c
parent4accd29c3e12e90c4ee5d4f6489c7c6e63758582 (diff)
downloadpttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar.gz
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar.bz2
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar.lz
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar.xz
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.tar.zst
pttbbs-200c31914f7abaeb08d08eac45473585bf6f453b.zip
a little bit modification of crosspost policy
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2213 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index c6efd63e..707dd98f 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -934,6 +934,7 @@ edit_post(int ent, fileheader_t * fhdr, char *direct)
Rename(fpath, genbuf);
if(strcmp(save_title, fhdr->title)){
// Ptt: here is the black hole problem
+ // (try getindex)
strcpy(fhdr->title, save_title);
substitute_ref_record(direct, fhdr, ent);
}
@@ -950,7 +951,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct)
char inputbuf[10], genbuf[200], genbuf2[4];
fileheader_t xfile;
FILE *xptr;
- int author = 0;
+ int author;
boardheader_t *bp;
if (!CheckPostPerm()) {
@@ -973,17 +974,23 @@ cross_post(int ent, fileheader_t * fhdr, char *direct)
if (*xboard == '\0' || !haspostperm(xboard))
return FULLUPDATE;
- if ((ent = str_checksum(fhdr->title)) != 0 &&
- ent == postrecord.checksum[0]) {
+ /* 借用變數 */
+ ent = str_checksum(fhdr->title);
+ author = getbnum(xboard);
+
+ if ((ent != 0 && ent == postrecord.checksum[0]) &&
+ (author != 0 && author != postrecord.last_bid)) {
/* 檢查 cross post 次數 */
if (postrecord.times++ > MAX_CROSSNUM)
anticrosspost();
} else {
postrecord.times = 0;
+ postrecord.last_bid = author;
postrecord.checksum[0] = ent;
}
ent = 1;
+ author = 0;
if (HAS_PERM(PERM_SYSOP) || !strcmp(fhdr->owner, cuser.userid)) {
getdata(2, 0, "(1)原文轉載 (2)舊轉錄格式?[1] ",
genbuf, 3, DOECHO);