From b860b474520a4f30b20c829d507d60a90338aadc Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 26 Mar 2008 05:28:34 +0000 Subject: - board_config: many people get confused about "one month", let's display "30 days" instead. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4021 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mbbsd/board.c b/mbbsd/board.c index b8d2ce01..1376e0da 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -13,7 +13,7 @@ #define NBRD_SYMBOLIC 64 #define TITLE_MATCH(bptr, key) ((key)[0] && !strcasestr((bptr)->title, (key))) - +#define MONTH_SECONDS (86400*30) #define B_TOTAL(bptr) (SHM->total[(bptr)->bid - 1]) #define B_LASTPOSTTIME(bptr) (SHM->lastposttime[(bptr)->bid - 1]) @@ -439,9 +439,13 @@ b_config(void) move_ansi(ipostres++, COLPOSTRES); i = bp->post_limit_regtime; attr = (cuser.firstlogin > - (now - (time4_t)bp->post_limit_regtime * 2592000)) ? 1 : 0; + (now - (time4_t)bp->post_limit_regtime * MONTH_SECONDS)) ? 1 : 0; if (attr) outs(ANSI_COLOR(31)); - prints("註冊時間 %d 個月以上",i); + outs("註冊時間 "); + if (i < 5) + prints("%d 天以上", i*30); + else + prints("%d 個月以上",i); if (attr) outs(ANSI_RESET); hasres = 1; } -- cgit v1.2.3