summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
}
}