diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-08-19 12:19:35 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-08-19 12:19:35 +0800 |
commit | d58534f9d052870abaf877596627d4e5b02af376 (patch) | |
tree | 28d375e6913a36b7f795f632e391b66d309ab1b9 | |
parent | bd514ad93ef790471cfcd81642831579ddadfc60 (diff) | |
download | pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar.gz pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar.bz2 pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar.lz pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar.xz pttbbs-d58534f9d052870abaf877596627d4e5b02af376.tar.zst pttbbs-d58534f9d052870abaf877596627d4e5b02af376.zip |
Revise violation messages.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5695 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/user.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c index c9d046f7..626501eb 100644 --- a/pttbbs/mbbsd/user.c +++ b/pttbbs/mbbsd/user.c @@ -1289,15 +1289,17 @@ u_info(void) void showplans_userec(userec_t *user) { - char genbuf[ANSILINELEN]; + char genbuf[ANSILINELEN]; if(user->userlevel & PERM_VIOLATELAW) { + const int can_save = (user->userlevel & PERM_LOGINOK) ? 1 : 0; + + prints(" " ANSI_COLOR(1;31) "此人違規 %s" ANSI_RESET, + can_save ? "尚未繳交罰單" : ""); + if (user->vl_count) - prints(" " ANSI_COLOR(1;31) "此人違規 尚未繳交罰單(已累計 %d 次)" - ANSI_RESET, user->vl_count); - else - outs(" " ANSI_COLOR(1;31) "此人違規 尚未繳交罰單" ANSI_RESET); + prints(" (已累計 %d 次)", user->vl_count); return; } @@ -1349,7 +1351,7 @@ showplans_userec(userec_t *user) sethomefile(genbuf, user->userid, fn_plans); if (!show_file(genbuf, 7, MAX_QUERYLINES, SHOWFILE_ALLOW_COLOR)) - prints("《個人名片》%s 目前沒有名片\n", user->userid); + prints("《個人名片》%s 目前沒有名片\n", user->userid); } void |