summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-29 01:20:56 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-10-29 01:20:56 +0800
commitf8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6 (patch)
tree5c35c92725c2e771302418ba629453226fb2fabb /mbbsd/bbs.c
parent33b6b249ea1b77005a6d2af64111899e2de6791f (diff)
downloadpttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar.gz
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar.bz2
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar.lz
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar.xz
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.tar.zst
pttbbs-f8af0fe1f0f0b5b07d5cb8124765f78e19ce90d6.zip
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1272 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 3fa2a048..f599e735 100644
--- a/mbbsd/bbs.c
+++ b/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)