diff options
Diffstat (limited to 'mbbsd/menu.c')
-rw-r--r-- | mbbsd/menu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 18a0d344..aa6a73e3 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -212,19 +212,20 @@ static void show_status(void) { int i; - struct tm *ptime = localtime4(&now); + struct tm ptime; char *myweek = "天一二三四五六"; const char *msgs[] = {"關閉", "打開", "拔掉", "防水", "好友"}; - i = ptime->tm_wday << 1; + localtime4_r(&now, &ptime); + i = ptime.tm_wday << 1; move(b_lines, 0); vbarf(ANSI_COLOR(34;46) "[%d/%d 星期%c%c %d:%02d]" ANSI_COLOR(1;33;45) "%-14s" ANSI_COLOR(30;47) " 線上" ANSI_COLOR(31) "%d" ANSI_COLOR(30) "人, 我是" ANSI_COLOR(31) "%s" ANSI_COLOR(30) "\t[扣機]" ANSI_COLOR(31) "%s ", - ptime->tm_mon + 1, ptime->tm_mday, myweek[i], myweek[i + 1], - ptime->tm_hour, ptime->tm_min, currutmp->birth ? + ptime.tm_mon + 1, ptime.tm_mday, myweek[i], myweek[i + 1], + ptime.tm_hour, ptime.tm_min, currutmp->birth ? "生日要請客唷" : SHM->today_is, SHM->UTMPnumber, cuser.userid, msgs[currutmp->pager]); |