diff options
-rw-r--r-- | include/common.h | 2 | ||||
-rw-r--r-- | mbbsd/chat.c | 2 | ||||
-rw-r--r-- | mbbsd/talk.c | 4 | ||||
-rw-r--r-- | mbbsd/user.c | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/include/common.h b/include/common.h index d3fee9b5..bf7a1cef 100644 --- a/include/common.h +++ b/include/common.h @@ -111,6 +111,8 @@ #define STR_POST1 "看板:" #define STR_POST2 "站內:" +#define STR_LOGINDAYS "登入天次" + /* AIDS */ #define AID_DISPLAYNAME "文章代碼(AID)" /* end of AIDS */ diff --git a/mbbsd/chat.c b/mbbsd/chat.c index 9c73c39d..fcf63144 100644 --- a/mbbsd/chat.c +++ b/mbbsd/chat.c @@ -204,7 +204,7 @@ chat_query(char *arg) char buf[ANSILINELEN], *ptr; FILE *fp; - snprintf(buf, sizeof(buf), "%s(%s) 上站資歷 %d 點,發表過 %d 篇文章", + snprintf(buf, sizeof(buf), "%s(%s) " STR_LOGINDAYS " %d ,發表過 %d 篇文章", xuser.userid, xuser.nickname, xuser.numlogindays, xuser.numposts); printchatline(buf); diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 997e7e8e..2ed5b5c8 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -471,7 +471,7 @@ my_query(const char *uident) // ------------------------------------------------------------ - prints("《上站資歷》%d 點", muser.numlogindays); + prints("《" STR_LOGINDAYS "》%d ", muser.numlogindays); #ifdef SHOW_LOGINOK if (!(muser.userlevel & PERM_LOGINOK)) outs(" (尚未通過認證)"); @@ -3307,7 +3307,7 @@ talkreply(void) strlcpy(currutmp->msgs[0].last_call_in, "呼叫、呼叫,聽到請回答 (Ctrl-R)", sizeof(currutmp->msgs[0].last_call_in)); currutmp->msgs[0].msgmode = MSGMODE_TALK; - prints("對方來自 [%s],上站資歷 %d 點,文章共 %d 篇\n", + prints("對方來自 [%s]," STR_LOGINDAYS " %d ,文章共 %d 篇\n", uip->from, xuser.numlogindays, xuser.numposts); if (is_chess) diff --git a/mbbsd/user.c b/mbbsd/user.c index 056c2cda..5f94c135 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -173,7 +173,7 @@ user_display(const userec_t * u, int adminmode) prints("\t\t認證資料: %s\n", u->justify); } - prints("\t\t上站文章: 上站資歷 %d / 文章 %d 篇\n", + prints("\t\t上站文章: " STR_LOGINDAYS " %d / 文章 %d 篇\n", u->numlogindays, u->numposts); sethomedir(genbuf, u->userid); @@ -850,13 +850,13 @@ uinfo_query(const char *orig_uid, int adminmode, int unum) do { int max_days = (x.lastlogin - x.firstlogin) / DAY_SECONDS; snprintf(genbuf, sizeof(genbuf), "%d", x.numlogindays); - if (getdata_str(y++, 0, "上線資歷:", buf, 10, DOECHO, genbuf)) + if (getdata_str(y++, 0, STR_LOGINDAYS, buf, 10, DOECHO, genbuf)) if ((tmp = atoi(buf)) >= 0) x.numlogindays = tmp; if (x.numlogindays > max_days) { x.numlogindays = max_days; - vmsgf("根據此使用者最後上線時間,資歷最大值為 %d.", max_days); + vmsgf("根據此使用者最後上線時間,最大值為 %d.", max_days); move(--y, 0); clrtobot(); continue; } |