diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-29 23:36:09 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-29 23:36:09 +0800 |
commit | f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca (patch) | |
tree | 5dd275cd740ee1aabc9c578b8a6c9eeed16f6b26 | |
parent | 485098dc5ed1faa1a8d92244a9f51070923b6728 (diff) | |
download | pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar.gz pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar.bz2 pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar.lz pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar.xz pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.tar.zst pttbbs-f0ccddf0a19dc7b9d1e14e83d49801b2e8f72eca.zip |
1.avoid bottom black hole
2.check board friend when crosspost
3.add 'X' in more
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1887 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 10 | ||||
-rw-r--r-- | mbbsd/edit.c | 2 | ||||
-rw-r--r-- | mbbsd/more.c | 14 |
3 files changed, 15 insertions, 11 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index c9b42145..c78f270b 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1150,6 +1150,11 @@ read_post(int ent, fileheader_t * fhdr, char *direct) } return FULLUPDATE; } + if(more_result == 998) + { + recommend(ent, fhdr, direct); + return FULLUPDATE; + } else return more_result; } return FULLUPDATE; @@ -2219,13 +2224,14 @@ push_bottom(int ent, fileheader_t * fhdr, char *direct) char buf[256]; if ((currmode & MODE_DIGEST) || !(currmode & MODE_BOARD)) return DONOTHING; - setbottomtotal(currbid); // Ptt : will be remove when stable + setbottomtotal(currbid); // <- Ptt : will be remove when stable num = getbottomtotal(currbid); if(getans(fhdr->filemode & FILE_BOTTOM ? "取消置底公告?(y/N)": "加入置底公告?(y/N)")!='y') return READ_REDRAW; fhdr->filemode ^= FILE_BOTTOM; - if(fhdr->filemode & FILE_BOTTOM) + if(fhdr->filemode & FILE_BOTTOM + && ent < getbtotal(currbid) ) { sprintf(buf, "%s.bottom", direct); if(num >= 5) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index eda5da08..ac03696c 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1050,7 +1050,7 @@ write_file(char *fpath, int saveheader, int *islocal) } currline = NULL; - if (postrecord.times > MAX_CROSSNUM - 1) + if (postrecord.times > MAX_CROSSNUM-1 && hbflcheck(currbid, currutmp->uid)) anticrosspost(); if (po && sum == 3) { diff --git a/mbbsd/more.c b/mbbsd/more.c index 33b36222..c55d6220 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -26,7 +26,6 @@ static char *more_help[] = { "(a/A) 跳至同一作者下/上篇", "([/]) 主題式閱\讀 上/下", "(t) 主題式循序閱\讀", - "(Ctrl-C) 小計算機", "(q)(←) 結束", "(h)(H)(?) 輔助說明畫面", NULL @@ -382,12 +381,15 @@ more(char *fpath, int promptend) lino = line = 0; } break; - case 'r': + case 'r': // Ptt: put all reply/recommend function here case 'R': case 'Y': case 'y': close(fd); return 999; + case 'X': + close(fd); + return 998; case 'A': close(fd); return AUTHOR_PREV; @@ -481,12 +483,8 @@ more(char *fpath, int promptend) getdata(b_lines - 2, 0, "把這篇文章收入到暫存檔?[y/N] ", buf, 4, LCECHO); if (buf[0] == 'y') { - char tmpbuf[128]; - - setuserfile(tmpbuf, ask_tmpbuf(b_lines - 1)); - snprintf(buf, sizeof(buf), - "cp -f %s %s", fpath, tmpbuf); - system(buf); + setuserfile(buf, ask_tmpbuf(b_lines - 1)); + Copy(fpath, buf); } if (pageno) pageno--; |