summaryrefslogtreecommitdiffstats
path: root/mbbsd/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r--mbbsd/user.c58
1 files changed, 54 insertions, 4 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 9227c381..f73a26be 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -89,6 +89,11 @@ user_display(userec_t * u, int real)
get_num_records(genbuf, sizeof(fileheader_t)),
u->exmailbox, u->mobile,
u->month, u->day, u->year % 100, u->mychicken.name);
+#ifdef PLAY_ANGEL
+ if (real)
+ prints(" 小 天 使: %s\n",
+ u->myangel[0] ? u->myangel : "無");
+#endif
prints(" 註冊日期: %s", ctime(&u->firstlogin));
prints(" 前次光臨: %s", ctime(&u->lastlogin));
prints(" 前次點歌: %s", ctime(&u->lastsong));
@@ -217,7 +222,11 @@ violate_law(userec_t * u, int unum)
static void Customize(void)
{
char done = 0, mindbuf[5];
+ int key;
char *wm[3] = {"一般", "進階", "未來"};
+#ifdef PLAY_ANGEL
+ char *am[4] = {"男女皆可", "限女生", "限男生", "暫不接受新的小主人"};
+#endif
showtitle("個人化設定", "個人化設定");
memcpy(mindbuf, &currutmp->mind, 4);
@@ -228,14 +237,23 @@ static void Customize(void)
move(4, 0);
prints("%-30s%10s\n", "A. 水球模式",
wm[(cuser.uflag2 & WATER_MASK)]);
- prints("%-30s%10s\n", "B. 接受站外信",
- ((cuser.userlevel & PERM_NOOUTMAIL) ? "否" : "是"));
+ prints("%-30s%10s\n", "B. 接受站外信", REJECT_OUTTAMAIL ? "否" : "是");
prints("%-30s%10s\n", "C. 新板自動進我的最愛",
((cuser.uflag2 & FAVNEW_FLAG) ? "是" : "否"));
prints("%-30s%10s\n", "D. 目前的心情", mindbuf);
prints("%-30s%10s\n", "E. 高亮度顯示我的最愛",
((cuser.uflag2 & FAVNOHILIGHT) ? "否" : "是"));
- switch(getkey("請按 [A-E] 切換設定,按 [Return] 結束:")){
+#ifdef PLAY_ANGEL
+ if( HAS_PERM(PERM_ANGEL) ){
+ prints("%-30s%10s\n", "F. 開放小主人詢問",
+ (REJECT_QUESTION ? "否" : "是"));
+ prints("%-30s%10s\n", "G. 接受的小主人性別", am[ANGEL_STATUS()]);
+ key = getkey("請按 [A-G] 切換設定,按 [Return] 結束:");
+ }else
+#endif
+ key = getkey("請按 [A-e] 切換設定,按 [Return] 結束:");
+
+ switch (key) {
case 'a':{
int currentset = cuser.uflag2 & WATER_MASK;
currentset = (currentset + 1) % 3;
@@ -245,7 +263,7 @@ static void Customize(void)
}
break;
case 'b':
- cuser.userlevel ^= PERM_NOOUTMAIL;
+ cuser.uflag2 ^= REJ_OUTTAMAIL;
break;
case 'c':
cuser.uflag2 ^= FAVNEW_FLAG;
@@ -266,6 +284,23 @@ static void Customize(void)
case 'e':
cuser.uflag2 ^= FAVNOHILIGHT;
break;
+
+#ifdef PLAY_ANGEL
+ case 'f':
+ if( HAS_PERM(PERM_ANGEL) ){
+ SwitchBeingAngel();
+ break;
+ }
+ done = 1;
+ break;
+
+ case 'g':
+ if( HAS_PERM(PERM_ANGEL) ){
+ SwitchAngelSex(ANGEL_STATUS() + 1);
+ break;
+ }
+#endif
+
default:
done = 1;
}
@@ -374,6 +409,21 @@ uinfo_query(userec_t * u, int real, int unum)
i++;
break;
}
+
+#ifdef PLAY_ANGEL
+ if (real)
+ while (1) {
+ getdata_str(i, 0, "小天使:", buf, IDLEN + 1, DOECHO,
+ x.myangel);
+ if(buf[0] == 0 || (getuser(buf) &&
+ (xuser.userlevel & PERM_ANGEL))){
+ strlcpy(x.myangel, buf, IDLEN + 1);
+ ++i;
+ break;
+ }
+ }
+#endif
+
if (real) {
int l;
if (HAS_PERM(PERM_BBSADM)) {