diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-10-03 14:47:36 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-10-03 14:47:36 +0800 |
commit | 3a1eb6118725ab980e763328fc82ce961e756b78 (patch) | |
tree | 4ed7011ebca93a909807c1ef6cb3be850ef2ed07 /mbbsd/syspost.c | |
parent | adf219a59c85fd819da3db8a6e12ca5243379a30 (diff) | |
download | pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar.gz pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar.bz2 pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar.lz pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar.xz pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.tar.zst pttbbs-3a1eb6118725ab980e763328fc82ce961e756b78.zip |
only log violations reported by police
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3439 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/syspost.c')
-rw-r--r-- | mbbsd/syspost.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c index e90632cc..05229c77 100644 --- a/mbbsd/syspost.c +++ b/mbbsd/syspost.c @@ -104,23 +104,26 @@ post_violatelaw(const char *crime, const char *police, const char *reason, const char title[TTLEN+1]; char msg[200]; - snprintf(title, sizeof(title), - "[報告] %s:%-*s 判決", crime, + snprintf(title, sizeof(title), "[報告] %s:%-*s 判決", crime, (int)(37 - strlen(reason) - strlen(crime)), reason); + snprintf(msg, sizeof(msg), ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n" " " ANSI_COLOR(1;32) "%s" ANSI_RESET "因" ANSI_COLOR(1;35) "%s" ANSI_RESET "行為,\n" "違反本站站規,處以" ANSI_COLOR(1;35) "%s" ANSI_RESET ",特此公告\n", police, crime, reason, result); - post_msg("PoliceLog",title,msg,"[Ptt法院]"); - snprintf(msg, sizeof(msg), - ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n" - " " ANSI_COLOR(1;32) "%s" ANSI_RESET "因" ANSI_COLOR(1;35) "%s" ANSI_RESET "行為,\n" - "違反本站站規,處以" ANSI_COLOR(1;35) "%s" ANSI_RESET ",特此公告\n", - "站務警察", crime, reason, result); + if (strstr(police, "警察")) { + post_msg("PoliceLog", title, msg, "[Ptt法院]"); + + snprintf(msg, sizeof(msg), + ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n" + " " ANSI_COLOR(1;32) "%s" ANSI_RESET "因" ANSI_COLOR(1;35) "%s" ANSI_RESET "行為,\n" + "違反本站站規,處以" ANSI_COLOR(1;35) "%s" ANSI_RESET ",特此公告\n", + "站務警察", crime, reason, result); + } - post_msg("ViolateLaw",title,msg,"[Ptt法院]"); + post_msg("ViolateLaw", title, msg, "[Ptt法院]"); } void |