summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-11-16 04:51:16 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-11-16 04:51:16 +0800
commite0a5fdf358d0b5af09649f66f50bd1b02616dfcb (patch)
treeb1805b44cb349570890378bb2a2f2957992ce738
parentfafe4c7e70de4e770f6bf7f42306957330aaadea (diff)
downloadpttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar.gz
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar.bz2
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar.lz
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar.xz
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.tar.zst
pttbbs-e0a5fdf358d0b5af09649f66f50bd1b02616dfcb.zip
fix bug for new feature.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3242 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/passwd.c3
-rw-r--r--mbbsd/syspost.c2
-rw-r--r--mbbsd/user.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index d0d6eb28..ba7e4580 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -80,7 +80,8 @@ passwd_update(int num, userec_t * buf)
{
userec_t u;
passwd_query(num, &u);
- buf->userlevel = u.userlevel;
+ cuser.userlevel = buf->userlevel = u.userlevel;
+ currutmp->alerts &= ~ALERT_RELOAD_PERM;
}
if ((pwdfd = open(fn_passwd, O_WRONLY)) < 0)
exit(1);
diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c
index 8c8e3d12..447e00e3 100644
--- a/mbbsd/syspost.c
+++ b/mbbsd/syspost.c
@@ -62,8 +62,6 @@ post_change_perm(int oldperm, int newperm, const char *sysopid, const char *user
char genbuf[200], reason[30];
int i, flag = 0;
- sendalert(userid, ALERT_RELOAD_PERM);
-
setbpath(genbuf, "Security");
stampfile(genbuf, &fhdr);
if (!(fp = fopen(genbuf, "w")))
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 2cda7201..00c92ed4 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -993,6 +993,8 @@ uinfo_query(userec_t *u, int adminmode, int unum)
setumoney(unum, x.money);
}
passwd_update(unum, &x);
+ if(flag)
+ sendalert(x.userid, ALERT_RELOAD_PERM); // force to reload perm
}
}