summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/bbs.c10
-rw-r--r--mbbsd/board.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 11ad652e..efac93c4 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -3093,10 +3093,12 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
{
userec_t xuser;
assert(tusernum != usernum);
- passwd_query(tusernum, &xuser);
- if (xuser.numposts > 0)
- xuser.numposts--;
- passwd_update(tusernum, &xuser);
+ // TODO we're doing redundant i/o here... merge and refine someday
+ if (passwd_sync_query(tusernum, &xuser) == 0) {
+ if (xuser.numposts > 0)
+ xuser.numposts--;
+ passwd_sync_update(tusernum, &xuser);
+ }
deumoney(tusernum, -fhdr->multi.money);
sendalert_uid(tusernum, ALERT_PWD_PERM);
#ifdef USE_COOLDOWN
diff --git a/mbbsd/board.c b/mbbsd/board.c
index e2bad4a8..6bc7f6da 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1343,7 +1343,8 @@ set_menu_BM(char *BM)
{
if (!HasUserPerm(PERM_NOCITIZEN) && (HasUserPerm(PERM_ALLBOARD) || is_uBM(BM, cuser.userid))) {
currmode |= MODE_GROUPOP;
- // cuser.userlevel |= PERM_SYSSUBOP | PERM_BM;
+ // XXX 不是很確定是否該在這邊 save level?
+ pwcuBitEnableLevel(PERM_SYSSUBOP | PERM_BM);
}
}