summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-08-08 14:06:58 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-08-08 14:06:58 +0800
commit59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9 (patch)
treeced45092a381a3e9a43d628285fd168b1018af7f /mbbsd
parent4266ffc842d1aa530a45ead5b185471224ce8d44 (diff)
downloadpttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar.gz
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar.bz2
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar.lz
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar.xz
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.tar.zst
pttbbs-59f4d71fdb2d6b9778f0468be242c1b15a9c4aa9.zip
When setting user data, point out and accept original angel
if s/he no longer has angel permission. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3397 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/user.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 626761d5..85e0130f 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -713,19 +713,31 @@ uinfo_query(userec_t *u, int adminmode, int unum)
}
#ifdef PLAY_ANGEL
- if (adminmode)
+ if (adminmode) {
+ const char* prompt;
+ userec_t the_angel;
+ if (x.myangel[0] == 0 || x.myangel[0] == '-' ||
+ (getuser(x.myangel, &the_angel) &&
+ the_angel.userlevel & PERM_ANGEL))
+ prompt = "小天使:";
+ else
+ prompt = "小天使(此帳號已無小天使資格):";
while (1) {
userec_t xuser;
- getdata_str(i, 0, "小天使:", buf, IDLEN + 1, DOECHO,
+ getdata_str(i, 0, prompt, buf, IDLEN + 1, DOECHO,
x.myangel);
if(buf[0] == 0 || strcmp(buf, "-") == 0 ||
(getuser(buf, &xuser) &&
- (xuser.userlevel & PERM_ANGEL))){
+ (xuser.userlevel & PERM_ANGEL)) ||
+ strcmp(x.myangel, buf) == 0){
strlcpy(x.myangel, xuser.userid, IDLEN + 1);
++i;
break;
}
+
+ prompt = "小天使:";
}
+ }
#endif
#ifdef CHESSCOUNTRY