diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-22 09:38:15 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-22 09:38:15 +0800 |
commit | 2f64261db80c6d5c818ab5554eee1810462ddaa2 (patch) | |
tree | 9df5d40c94e9a8bc591d7928c9214a1c5720ce8b /mbbsd | |
parent | 80a638f39acbd629e35002f120ad29fb03917245 (diff) | |
download | pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar.gz pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar.bz2 pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar.lz pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar.xz pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.tar.zst pttbbs-2f64261db80c6d5c818ab5554eee1810462ddaa2.zip |
* add more info (mostly uflags) to admin view
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4874 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/user.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c index f915ddbe..05484af6 100644 --- a/mbbsd/user.c +++ b/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)) |