diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-21 04:28:21 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-21 04:28:21 +0800 |
commit | 80d6431f5d2fa48f925712ccd98c1983404e7ee9 (patch) | |
tree | 6411ae9d890ba61413664da1f37f468259f4281c /mbbsd/cache.c | |
parent | 82664ae2ecc5db24c614f7a625e859975f55a6b5 (diff) | |
download | pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar.gz pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar.bz2 pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar.lz pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar.xz pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.tar.zst pttbbs-80d6431f5d2fa48f925712ccd98c1983404e7ee9.zip |
revert cuser from pointer to buffer.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1798 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 2517ee1e..15398ece 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -315,12 +315,6 @@ apply_ulist(int (*fptr) (userinfo_t *)) } userinfo_t * -search_ulist(int uid) -{ - return search_ulistn(uid, 1); -} - -userinfo_t * search_ulist_pid(int pid) { register int i = 0, j, start = 0, end = SHM->UTMPnumber - 1; @@ -468,18 +462,6 @@ deumoney(int uid, int money) return setumoney(uid, SHM->money[uid - 1] + money); } -int -demoney(int money) -{ - return deumoney(usernum, money); -} - -int -moneyof(int uid) -{ /* ptt ��i�����B�z�IJv */ - return SHM->money[uid - 1]; -} - /* * section - utmp */ @@ -494,7 +476,7 @@ setutmpmode(unsigned int mode) if (HAS_PERM(PERM_LOGUSER)) { char msg[200]; snprintf(msg, sizeof(msg), "%s setutmpmode to %s(%d) at %s", - cuser->userid, modestring(currutmp, 0), mode, Cdate(&COMMON_TIME)); + cuser.userid, modestring(currutmp, 0), mode, Cdate(&COMMON_TIME)); log_user(msg); } } @@ -634,23 +616,6 @@ apply_boards(int (*func) (boardheader_t *)) } #endif -boardheader_t * -getbcache(int bid) -{ /* Ptt��g */ - return bcache + bid - 1; -} - -int -getbtotal(int bid) -{ - return SHM->total[bid - 1]; -} -int -getbottomtotal(int bid) -{ - return SHM->n_bottom[bid-1]; -} - void setbottomtotal(int bid) { @@ -731,7 +696,7 @@ haspostperm(char *bname) char buf[200]; setbfile(buf, bname, fn_water); - if (belong(buf, cuser->userid)) + if (belong(buf, cuser.userid)) return 0; if (!strcasecmp(bname, DEFAULT_BOARD)) @@ -787,7 +752,7 @@ int is_BM_cache(int bid) /* bid starts from 1 */ currutmp->uid == SHM->BMcache[bid][1] || currutmp->uid == SHM->BMcache[bid][2] || currutmp->uid == SHM->BMcache[bid][3] ){ - cuser->userlevel |= PERM_BM; + cuser.userlevel |= PERM_BM; return 1; } return 0; |