summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-03-25 19:08:34 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-03-25 19:08:34 +0800
commit545f468a4d0615f393adebec3675d8f53004b418 (patch)
tree032a97ccbc298bfe6187a4c1ea660bcebf00f2e6
parenteb249fb8a3ef029be4e25da4cf9d9b5aee7a8033 (diff)
downloadpttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar.gz
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar.bz2
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar.lz
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar.xz
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.tar.zst
pttbbs-545f468a4d0615f393adebec3675d8f53004b418.zip
Related changes for new lastlogin.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5963 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/user.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c
index 3e146f9f..9b510abe 100644
--- a/pttbbs/mbbsd/user.c
+++ b/pttbbs/mbbsd/user.c
@@ -197,8 +197,6 @@ user_display(const userec_t * u, int adminmode)
prints("\t註冊日期: %s (已滿 %d 天)\n",
Cdate(&u->firstlogin), (int)((now - u->firstlogin)/DAY_SECONDS));
- prints("\t上次上站: %s (來自 %s)\n",
- Cdate(&u->lastlogin), u->lasthost);
if (adminmode) {
strcpy(genbuf, "bTCPRp#@XWBA#VSM0123456789ABCDEF");
@@ -218,7 +216,10 @@ user_display(const userec_t * u, int adminmode)
get_num_records(genbuf, sizeof(fileheader_t)),
u->exmailbox);
- if (!adminmode) {
+ if (adminmode) {
+ prints("\t最後上線: %s (掛站每24小時自動更新), 來自 %s)\n",
+ Cdate(&u->lastlogin), u->lasthost);
+ } else {
diff = (now - login_start_time) / 60;
prints("\t停留期間: %d 小時 %2d 分\n",
diff / 60, diff % 60);
@@ -1020,7 +1021,10 @@ uinfo_query(const char *orig_uid, int adminmode, int unum)
} else {
userec_t atuser;
passwd_sync_query(uid, &atuser);
- if (atuser.numlogindays < 6*30) {
+ if (!(atuser.userlevel & PERM_LOGINOK)) {
+ outs("\n使用者未通過認證,請重新輸入。\n");
+ i--;
+ } else if (atuser.numlogindays < 6*30) {
outs("\n" STR_LOGINDAYS "未超過 180,請重新輸入\n");
i--;
}