From 99b4edeccaa2850d2ef3851569b2d16485ef58b5 Mon Sep 17 00:00:00 2001 From: ptt Date: Tue, 12 Oct 2004 20:00:54 +0000 Subject: 1. remove do_unanonymous_post function. It is almost the same as do_crosspost. And it didn't touch the btotal. 2. Change setbtotal to touchbtotal at do_crosspost. Because this boards are not popular. To count .DIR every time is needless. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2247 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 8 ++++---- mbbsd/syspost.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index e9bd8eee..8e9f8e7e 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -398,7 +398,7 @@ do_reply_title(int row, char *title) if (genbuf2[0] == 'n' || genbuf2[0] == 'N') getdata(++row, 0, "標題:", save_title, TTLEN, DOECHO); } - +/* static void do_unanonymous_post(char *fpath) { @@ -418,7 +418,7 @@ do_unanonymous_post(char *fpath) append_record(title, &mhdr, sizeof(mhdr)); } } - +*/ #ifdef NO_WATER_POST #ifndef DEBUG static time_t last_post_time = 0; @@ -444,7 +444,7 @@ do_crosspost(char *brd, fileheader_t *postfile, const char *fpath) postfile->filemode = FILE_LOCAL; setbdir(genbuf, brd); if (append_record(genbuf, &fh, sizeof(fileheader_t)) != -1) { - setbtotal(getbnum(brd)); + touchbtotal(getbnum(brd)); } } static void @@ -735,7 +735,7 @@ do_general(int isbid) curredit ^= EDIT_BOTH; } if (currbrdattr & BRD_ANONYMOUS) - do_unanonymous_post(fpath); + do_crosspost("UnAnonymous", &postfile, fpath); } pressanykey(); return FULLUPDATE; diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c index 2d5f9e5d..1070e7c9 100644 --- a/mbbsd/syspost.c +++ b/mbbsd/syspost.c @@ -134,7 +134,7 @@ post_violatelaw(char *crime, char *police, char *reason, char *result) crime, ctime(&now), police, crime, reason, result); fclose(fp); snprintf(fhdr.title, sizeof(fhdr.title), - "[報告] %s:%-*s 判決", crime, 34-strlen(reason)-strlen(crime), reason); + "[報告] %s:%-*s 判決", crime, 37-strlen(reason)-strlen(crime), reason); strlcpy(fhdr.owner, "[Ptt法院]", sizeof(fhdr.owner)); append_record("boards/V/ViolateLaw/.DIR", &fhdr, sizeof(fhdr)); -- cgit v1.2.3