diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 20:22:07 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 20:22:07 +0800 |
commit | 2f6959aecaaaed4980f7c8740f2fae2c8fc326ca (patch) | |
tree | d3d59847cadac9939bc0e9945530cfd1b7a5caeb /mbbsd/user.c | |
parent | c5f8e88cde8ad8120fd5e2bdaddd2f5591502aa8 (diff) | |
download | pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.gz pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.bz2 pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.lz pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.xz pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.zst pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.zip |
* refine cmbbs: move util_passwd.o to cmbbs/passwd.c.
* note: in order to workaround the buggy/dirty synchronization hacks, changed 'passwd_query' and 'passwd_update' to passwd_sync_*.
* util/* and daemon/* use directly passwd_query/update, and mbbsd should use passwd_sync_*.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4574 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r-- | mbbsd/user.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c index 7ef3578f..0111869c 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -35,7 +35,7 @@ kill_user(int num, const char *userid) memset(&u, 0, sizeof(userec_t)); log_usies("KILL", getuserid(num)); setuserid(num, ""); - passwd_update(num, &u); + passwd_sync_update(num, &u); return 0; } int @@ -67,7 +67,7 @@ u_loginview(void) if (pbits != cuser.loginview) { cuser.loginview = pbits; - passwd_update(usernum, &cuser); + passwd_sync_update(usernum, &cuser); } return 0; } @@ -80,7 +80,7 @@ int u_cancelbadpost(void) if(search_ulistn(usernum,2)) {vmsg("請登出其他視窗, 否則不受理."); return 0;} - passwd_query(usernum, &cuser); + passwd_sync_query(usernum, &cuser); if (currutmp && (currutmp->alerts & ALERT_PWD)) currutmp->alerts &= ~ALERT_PWD; @@ -105,7 +105,7 @@ int u_cancelbadpost(void) { int prev = cuser.badpost--; cuser.timeremovebadpost = now; - passwd_update(usernum, &cuser); + passwd_sync_update(usernum, &cuser); log_filef("log/cancelbadpost.log", LOG_CREAT, "%s %s 刪除一篇劣文 (%d -> %d 篇)\n", Cdate(&now), cuser.userid, prev, cuser.badpost); @@ -340,7 +340,7 @@ violate_law(userec_t * u, int unum) u->userlevel |= PERM_VIOLATELAW; u->timeviolatelaw = now; u->vl_count++; - passwd_update(unum, u); + passwd_sync_update(unum, u); post_violatelaw(u->userid, cuser.userid, reason, "罰單處份"); mail_violatelaw(u->userid, "站務警察", reason, "罰單處份"); } @@ -527,7 +527,7 @@ void Customize(void) if(dirty) { - passwd_update(usernum, &cuser); + passwd_sync_update(usernum, &cuser); outs("設定已儲存。\n"); } else { outs("結束設定。\n"); @@ -942,7 +942,7 @@ uinfo_query(userec_t *u, int adminmode, int unum) break; } else { userec_t atuser; - passwd_query(uid, &atuser); + passwd_sync_query(uid, &atuser); if (now - atuser.firstlogin < 6 * 30 * 24 * 60 * 60) { outs("\n註冊未超過半年,請重新輸入\n"); i--; @@ -1101,7 +1101,7 @@ uinfo_query(userec_t *u, int adminmode, int unum) setumoney(unum, x.money); } - passwd_update(unum, &x); + passwd_sync_update(unum, &x); if (adminmode) { |