summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-11 02:04:39 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-11 02:04:39 +0800
commite3a95cf6d13c9b378e65cc4e549470f4b29cd3cd (patch)
treee54a7d2f3e230d3fd399ef8648a1091a9a662f57
parenta091804d660ece09722849f2a8aabe92f8f02a4e (diff)
downloadpttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar.gz
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar.bz2
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar.lz
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar.xz
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.tar.zst
pttbbs-e3a95cf6d13c9b378e65cc4e549470f4b29cd3cd.zip
seGga's suggestion:
in categories of badpost the default is cancel. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2720 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 954ace1b..9c35f722 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1935,23 +1935,24 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
for (i = 0; i < SIZE; i++)
prints("%d.%s ", i + 1, badpost_reason[i]);
prints("%d.%s", i + 1, "其他");
- getdata(b_lines - 1, 0, "請選擇:", genbuf, 3, LCECHO);
+ getdata(b_lines - 1, 0, "請選擇[0:取消劣文]:", genbuf, 3, LCECHO);
i = genbuf[0] - '1';
if (i >= 0 && i < SIZE)
sprintf(genbuf,"劣文退回(%s)", badpost_reason[i]);
- else
+ else if(i==SIZE)
{
strcpy(genbuf,"劣文退回(");
getdata_buf(b_lines, 0, "請輸入原因", genbuf+9,
50, DOECHO);
strcat(genbuf,")");
}
- strncat(genbuf, fhdr->title, 64-strlen(genbuf));
+ if(i>=0 && i <= SIZE)
+ {
+ strncat(genbuf, fhdr->title, 64-strlen(genbuf));
+ add_cooldowntime(tusernum, 60);
+ add_posttimes(tusernum, 15); //Ptt: 凍結 post for 1 hour
- add_cooldowntime(tusernum, 60);
- add_posttimes(tusernum, 15); //Ptt: 凍結 post for 1 hour
-
- if (!(inc_badpost(userid, 1) % 5)){
+ if (!(inc_badpost(userid, 1) % 5)){
userec_t xuser;
post_violatelaw(userid, "Ptt 系統警察", "劣文累計 5 篇", "罰單一張");
mail_violatelaw(userid, "Ptt 系統警察", "劣文累計 5 篇", "罰單一張");
@@ -1961,9 +1962,10 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
xuser.vl_count++;
xuser.userlevel |= PERM_VIOLATELAW;
passwd_update(tusernum, &xuser);
- }
- mail_id(userid, genbuf, newpath, cuser.userid);
- }
+ }
+ mail_id(userid, genbuf, newpath, cuser.userid);
+ }
+ }
}
#undef SIZE
#endif