diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-04 01:36:57 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-04 01:36:57 +0800 |
commit | defbdb6544e58ade4316af4a2e003568d34aa6a1 (patch) | |
tree | bc81167a8805590feaf2c65961a8ef2ad4994c93 /mbbsd/passwd.c | |
parent | 5166f31cd61af5481f3a418e761368e643230f38 (diff) | |
download | pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar.gz pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar.bz2 pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar.lz pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar.xz pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.tar.zst pttbbs-defbdb6544e58ade4316af4a2e003568d34aa6a1.zip |
1. add "cancel bad post" feature.
2. fix bad the bug that user won't get bad post when he is online.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3260 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/passwd.c')
-rw-r--r-- | mbbsd/passwd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c index ba7e4580..f5f03ca5 100644 --- a/mbbsd/passwd.c +++ b/mbbsd/passwd.c @@ -76,12 +76,16 @@ passwd_update(int num, userec_t * buf) if (num < 1 || num > MAX_USERS) return -1; buf->money = moneyof(num); - if(usernum ==num && (currutmp->alerts & ALERT_RELOAD_PERM)) + pwdfd = currutmp->alerts; + if(usernum == num && (pwdfd & ALERT_PWD)) { userec_t u; passwd_query(num, &u); - cuser.userlevel = buf->userlevel = u.userlevel; - currutmp->alerts &= ~ALERT_RELOAD_PERM; + if(pwdfd & ALERT_PWD_BADPOST) + cuser.badpost = buf->badpost = u.badpost; + if(pwdfd & ALERT_PWD_PERM) + cuser.userlevel = buf->userlevel = u.userlevel; + currutmp->alerts &= ~ALERT_PWD; } if ((pwdfd = open(fn_passwd, O_WRONLY)) < 0) exit(1); |