From d58534f9d052870abaf877596627d4e5b02af376 Mon Sep 17 00:00:00 2001 From: piaip Date: Sun, 19 Aug 2012 04:19:35 +0000 Subject: Revise violation messages. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5695 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/user.c | 14 ++++++++------ 1 file 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 -- cgit v1.2.3