summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-10-03 14:47:36 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-10-03 14:47:36 +0800
commit3a1eb6118725ab980e763328fc82ce961e756b78 (patch)
tree4ed7011ebca93a909807c1ef6cb3be850ef2ed07
parentadf219a59c85fd819da3db8a6e12ca5243379a30 (diff)
downloadpttbbs-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
-rw-r--r--mbbsd/syspost.c21
-rw-r--r--mbbsd/user.c2
2 files changed, 13 insertions, 10 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
diff --git a/mbbsd/user.c b/mbbsd/user.c
index fd9a235b..1c521ac0 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -305,7 +305,7 @@ violate_law(userec_t * u, int unum)
u->vl_count++;
passwd_update(unum, u);
post_violatelaw(u->userid, cuser.userid, reason, "罰單處份");
- mail_violatelaw(u->userid, cuser.userid, reason, "罰單處份");
+ mail_violatelaw(u->userid, "站務警察", reason, "罰單處份");
}
pressanykey();
}