summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-22 09:38:15 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-22 09:38:15 +0800
commit9d3ac5517c97868cd507f4182432fcfd6feb3cfa (patch)
tree70f644b9b3ee1380cb53e13abccc9d3b5b88afd1
parent64148781040728f66e4795105f4b8acf4747c301 (diff)
downloadpttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar.gz
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar.bz2
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar.lz
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar.xz
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.tar.zst
pttbbs-9d3ac5517c97868cd507f4182432fcfd6feb3cfa.zip
* add more info (mostly uflags) to admin view
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4874 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/user.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c
index f915ddbe..05484af6 100644
--- a/pttbbs/mbbsd/user.c
+++ b/pttbbs/mbbsd/user.c
@@ -238,10 +238,38 @@ user_display(const userec_t * u, int adminmode)
outs(" " ANSI_COLOR(30;41) "┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴┬┴"
"┬┴┬┴┬┴┬" ANSI_RESET);
-
- outs((u->userlevel & PERM_LOGINOK) ?
- "\n您的註冊程序已經完成,歡迎加入本站" :
- "\n如果要提昇權限,請參考本站公佈欄辦理註冊");
+ if (!adminmode)
+ {
+ outs((u->userlevel & PERM_LOGINOK) ?
+ "\n您的註冊程序已經完成,歡迎加入本站" :
+ "\n如果要提昇權限,請參考本站公佈欄辦理註冊");
+ } else {
+ // XXX list user pref here
+ int i;
+ static const char *uflag_desc[] = {
+ "拒收外信",
+ "最愛自動加新板",
+ "外藉",
+ "居留權",
+ };
+ static uint32_t uflag_mask[] = {
+ UF_REJ_OUTTAMAIL,
+ UF_FAV_ADDNEW,
+ UF_FOREIGN,
+ UF_LIVERIGHT,
+ };
+
+ prints("\n其它資訊: [%s]", (u->userlevel & PERM_LOGINOK) ?
+ "已註冊" : "未註冊");
+
+ for (i = 0; i < sizeof(uflag_mask)/sizeof(uflag_mask[0]); i++)
+ {
+ if (!(u->uflag & uflag_mask[i]))
+ continue;
+ prints("[%s]", uflag_desc[i]);
+ }
+ prints("\n");
+ }
#ifdef NEWUSER_LIMIT
if ((u->lastlogin - u->firstlogin < 3 * DAY_SECONDS) && !HasUserPerm(PERM_POST))