summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/register.c15
-rw-r--r--mbbsd/user.c77
2 files changed, 49 insertions, 43 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index bf62d322..5b96035e 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -1913,9 +1913,12 @@ ui_display_regform_single(
user_display(xuser, 1);
move(14, 0);
prints(ANSI_COLOR(1;32)
- "--------------- 這是第 %2d 份註冊單 ------------------"
+ "--------------- 這是第 %2d 份註冊單 -----------------------"
ANSI_RESET "\n", tid);
- prints(" %-12s: %s\n", "帳號", pre->userid);
+ prints(" %-12s: %s %s\n", "帳號", pre->userid,
+ (xuser->userlevel & PERM_NOREGCODE) ?
+ ANSI_COLOR(1;31) " [T:禁止使用認證碼註冊]" ANSI_RESET:
+ "");
prints("0.%-12s: %s%s\n", "真實姓名", pre->name,
xuser->uflag2 & FOREIGN ? " (外籍)" :
"");
@@ -2002,8 +2005,8 @@ regform2_validate_single(const char *xuid)
continue;
}
- // TODO check if user is already registered
-#ifdef DBG_DRYRUN
+#ifndef DBG_DRYRUN
+ // check if user is already registered
if (muser.userlevel & PERM_LOGINOK)
{
regfrm_delete(uid);
@@ -2121,8 +2124,8 @@ regform2_validate_page(int dryrun)
continue;
}
+#ifndef DBG_DRYRUN
// TODO check if user is already registered
-#ifdef DBG_DRYRUN
if (muser.userlevel & PERM_LOGINOK)
{
regfrm_delete(uid);
@@ -2619,7 +2622,7 @@ scan_register_form(const char *regfile, int automode, const char *target_uid)
move(14, 0);
prints(ANSI_COLOR(1;32) "------------- "
"請站長嚴格審核使用者資料,這是第 %d 份"
- "------------" ANSI_RESET "\n", tid);
+ "-----------------" ANSI_RESET "\n", tid);
prints(" %-12s: %s\n", finfo[0], fdata[0]);
#ifdef FOREIGN_REG
prints("0.%-12s: %s%s\n", finfo[1], fdata[1],
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 353beba4..3d46042c 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -157,52 +157,24 @@ user_display(const userec_t * u, int adminmode)
resolve_over18_user(u) ? "已" : "未"
);
-#ifdef ASSESS
- prints(" 優 劣 文: 優:%d / 劣:%d\n",
- u->goodpost, u->badpost);
-#endif // ASSESS
-
- prints(" 上站位置: %s\n", u->lasthost);
-
-#ifdef PLAY_ANGEL
- if (adminmode)
- prints(" 小 天 使: %s\n",
- u->myangel[0] ? u->myangel : "無");
-#endif
prints(" 註冊日期: (已滿%d天) %s",
(int)((now - u->firstlogin)/86400),
ctime4(&u->firstlogin));
- prints(" 前次光臨: %s", ctime4(&u->lastlogin));
- prints(" 上站文章: %d 次 / %d 篇\n",
- u->numlogins, u->numposts);
-
-#ifdef CHESSCOUNTRY
- {
- int i, j;
- FILE* fp;
- for(i = 0; i < 2; ++i){
- sethomefile(genbuf, u->userid, chess_photo_name[i]);
- fp = fopen(genbuf, "r");
- if(fp != NULL){
- for(j = 0; j < 11; ++j)
- fgets(genbuf, 200, fp);
- fgets(genbuf, 200, fp);
- prints("%12s棋國自我描述: %s", chess_type[i], genbuf + 11);
- fclose(fp);
- }
- }
- }
-#endif
+ prints(" 上次上站: %s (%s)\n", u->lasthost, Cdate(&u->lastlogin));
if (adminmode) {
strcpy(genbuf, "bTCPRp#@XWBA#VSM0123456789ABCDEF");
for (diff = 0; diff < 32; diff++)
if (!(u->userlevel & (1 << diff)))
genbuf[diff] = '-';
- prints(" 認證資料: %s\n"
- " user權限: %s\n",
- u->justify, genbuf);
- } else {
+ prints(" 帳號權限: %s\n", genbuf);
+ prints(" 認證資料: %s\n", u->justify);
+ }
+
+ prints(" 上站文章: %d 次 / %d 篇\n",
+ u->numlogins, u->numposts);
+
+ if (!adminmode) {
diff = (now - login_start_time) / 60;
prints(" 停留期間: %d 小時 %2d 分\n",
diff / 60, diff % 60);
@@ -223,6 +195,37 @@ user_display(const userec_t * u, int adminmode)
}
outc('\n');
}
+
+ // conditional fields
+#ifdef ASSESS
+ prints(" 優 劣 文: 優:%d / 劣:%d\n",
+ u->goodpost, u->badpost);
+#endif // ASSESS
+
+#ifdef CHESSCOUNTRY
+ {
+ int i, j;
+ FILE* fp;
+ for(i = 0; i < 2; ++i){
+ sethomefile(genbuf, u->userid, chess_photo_name[i]);
+ fp = fopen(genbuf, "r");
+ if(fp != NULL){
+ for(j = 0; j < 11; ++j)
+ fgets(genbuf, 200, fp);
+ fgets(genbuf, 200, fp);
+ prints("%12s棋國自我描述: %s", chess_type[i], genbuf + 11);
+ fclose(fp);
+ }
+ }
+ }
+#endif
+
+#ifdef PLAY_ANGEL
+ if (adminmode)
+ prints(" 小 天 使: %s\n",
+ u->myangel[0] ? u->myangel : "無");
+#endif
+
outs(" " ANSI_COLOR(30;41) "┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴"
"┬┴┬┴┬┴┬" ANSI_RESET);