diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-20 08:55:34 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-07-20 08:55:34 +0800 |
commit | 24ec3204b34c9e6749b9312f2edb84edb2a4cb34 (patch) | |
tree | 4c4bc5443344d91ab20163b0ed491732d2a732ed /mbbsd/mbbsd.c | |
parent | 047bb28fce410663731f69295cff89ab902a6085 (diff) | |
download | pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.gz pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.bz2 pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.lz pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.xz pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.tar.zst pttbbs-24ec3204b34c9e6749b9312f2edb84edb2a4cb34.zip |
merge from MergeCache
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1065 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index da5c6c94..4220f9b0 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1,4 +1,4 @@ -/* $Id: mbbsd.c,v 1.89 2003/07/17 00:57:21 in2 Exp $ */ +/* $Id: mbbsd.c,v 1.90 2003/07/20 00:55:34 in2 Exp $ */ #include "bbs.h" #define SOCKET_QLEN 4 @@ -162,7 +162,7 @@ u_exit(char *mode) //userec_t xuser; int diff = (time(0) - login_start_time) / 60; - /* close fd 0 & a to terminate network */ + /* close fd 0 & 1 to terminate network */ close(0); close(1); @@ -697,13 +697,16 @@ where(char *from) #endif static void -check_BM() +check_BM(void) { + /* XXX: -_- */ int i; - boardheader_t *bhdr; cuser.userlevel &= ~PERM_BM; - for (i = 0, bhdr = bcache; i < numboards && !is_BM(bhdr->BM); i++, bhdr++); + for( i = 0 ; i < numboards ; ++i ) + if( is_BM_cache(i + 1) ) /* XXXbid */ + return; + //for (i = 0, bhdr = bcache; i < numboards && !is_BM(bhdr->BM); i++, bhdr++); } static void @@ -715,8 +718,6 @@ setup_utmp(int mode) uinfo.uid = usernum; uinfo.mode = currstat = mode; uinfo.mailalert = load_mailalert(cuser.userid); - if (!(cuser.numlogins % 20) && cuser.userlevel & PERM_BM) - check_BM(); /* Ptt 自動取下離職板主權力 */ uinfo.userlevel = cuser.userlevel; uinfo.sex = cuser.sex % 8; @@ -749,6 +750,8 @@ setup_utmp(int mode) uinfo.invisible = YEA; getnewutmpent(&uinfo); SHM->UTMPneedsort = 1; + if (!(cuser.numlogins % 20) && cuser.userlevel & PERM_BM) + check_BM(); /* Ptt 自動取下離職板主權力 */ #ifndef _BBS_UTIL_C_ friend_load(); nice(3); |