diff options
-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--; |