diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-29 01:20:56 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-29 01:20:56 +0800 |
commit | da5238eaed77274969ea012e4702397ddd247a47 (patch) | |
tree | 6b45a6fd9b7f3e3c04ca3a6dc39f047c9f890afd | |
parent | 72587298f0765b1a719eb666240a5c0b8303cdc1 (diff) | |
download | pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar.gz pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar.bz2 pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar.lz pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar.xz pttbbs-da5238eaed77274969ea012e4702397ddd247a47.tar.zst pttbbs-da5238eaed77274969ea012e4702397ddd247a47.zip |
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@1272 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index 3fa2a048..f599e735 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -338,20 +338,20 @@ outgo_post(fileheader_t * fh, char *board) } static void -cancelpost(fileheader_t * fh, int by_BM) +cancelpost(fileheader_t * fh, int by_BM, char *newpath) { FILE *fin, *fout; char *ptr, *brd; fileheader_t postfile; char genbuf[200]; - char nick[STRLEN], fn1[STRLEN], fn2[STRLEN]; + char nick[STRLEN], fn1[STRLEN]; setbfile(fn1, currboard, fh->filename); if ((fin = fopen(fn1, "r"))) { brd = by_BM ? "deleted" : "junk"; - setbpath(fn2, brd); - stampfile(fn2, &postfile); + setbpath(newpath, brd); + stampfile(newpath, &postfile); memcpy(postfile.owner, fh->owner, IDLEN + TTLEN + 10); nick[0] = '\0'; @@ -372,7 +372,7 @@ cancelpost(fileheader_t * fh, int by_BM) fclose(fout); } fclose(fin); - Rename(fn1, fn2); + Rename(fn1, newpath); setbdir(genbuf, brd); setbtotal(getbnum(brd)); append_record(genbuf, &postfile, sizeof(postfile)); @@ -1708,7 +1708,7 @@ del_range(int ent, fileheader_t * fhdr, char *direct) static int del_post(int ent, fileheader_t * fhdr, char *direct) { - char genbuf[100]; + char genbuf[100], newpath[256]; int not_owned; boardheader_t *bp; @@ -1747,15 +1747,20 @@ del_post(int ent, fileheader_t * fhdr, char *direct) fhdr->money = hdr.money; delete_file(genbuf, sizeof(fileheader_t), num, cmpfilename); } + + cancelpost(fhdr, not_owned, newpath); #ifdef ASSESS if (not_owned) { getdata(1, 40, "´c¦H¤å³¹?(y/N)", genbuf, 3, LCECHO); if(genbuf[0]=='y') + { inc_badpost(searchuser(fhdr->owner), 1); + sprintf(genbuf,"¦H¤å°h¦^:%40.40s", fhdr->title); + mail_id(fhdr->owner, genbuf, newpath, cuser.userid); + } } #endif - cancelpost(fhdr, not_owned); setbtotal(currbid); if (fhdr->money < 0) |