From 75959970db064a713d61af3754bbf6fd9f07e254 Mon Sep 17 00:00:00 2001 From: victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> Date: Mon, 2 Feb 2004 07:48:58 +0000 Subject: reason for bad post git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1506 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 8c93f7b3..5b04073f 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -3,6 +3,10 @@ static int recommend(int ent, fileheader_t * fhdr, char *direct); +static char *badpost_reason[] = { + "�s�i", "��������", "�H������" +}; + static void mail_by_link(char *owner, char *title, char *path) { @@ -1872,19 +1876,33 @@ del_post(int ent, fileheader_t * fhdr, char *direct) else num = searchuser(fhdr->owner); #ifdef ASSESS +#define SIZE sizeof(badpost_reason) / sizeof(char *) if (not_owned && num > 0 && !(currmode & MODE_DIGEST)) { getdata(1, 40, "�c�H�峹?(y/N)", genbuf, 3, LCECHO); if(genbuf[0]=='y') { + int i; + char reason[64]; + move(b_lines - 2, 0); + for (i = 0; i < SIZE; i++) + prints("%d.%s ", i + 1, badpost_reason[i]); + prints("%d.%s", i + 1, "��L"); + getdata(b_lines - 1, 0, "�п��", reason, sizeof(reason), LCECHO); + i = reason[0] - '0'; + if (i <= 0 || i > SIZE) + getdata(b_lines, 0, "�п�J��]", reason, sizeof(reason), DOECHO); + else + strcpy(reason, badpost_reason[i - 1]); if (!(inc_badpost(num, 1) % 10)){ post_violatelaw(xuser.userid, "Ptt �t��ĵ��", "�H��֭p�Q�g", "�@��@�i"); mail_violatelaw(xuser.userid, "Ptt �t��ĵ��", "�H��֭p�Q�g", "�@��@�i"); xuser.userlevel |= PERM_VIOLATELAW; } - sprintf(genbuf,"�H��h�^:%-40.40s", fhdr->title); + sprintf(genbuf,"�H��h�^(%s):%-40.40s", reason, fhdr->title); mail_id(xuser.userid, genbuf, newpath, cuser.userid); } } +#undef SIZE #endif setbtotal(currbid); -- cgit v1.2.3