diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-05 10:42:29 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-06-05 10:42:29 +0800 |
commit | fcb4ca800df95b25e65ad7cb8d9cd04c89be4409 (patch) | |
tree | 0b61aea0a74adb768c1ec0e0db3727ae12180f67 /mbbsd/board.c | |
parent | 34b6115e332c9f1de548cf7c143f80cc9cf3e516 (diff) | |
download | pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar.gz pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar.bz2 pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar.lz pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar.xz pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.tar.zst pttbbs-fcb4ca800df95b25e65ad7cb8d9cd04c89be4409.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@290 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r-- | mbbsd/board.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index af997121..75503b23 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.29 2002/06/04 13:08:33 in2 Exp $ */ +/* $Id: board.c,v 1.30 2002/06/05 02:42:29 ptt Exp $ */ #include "bbs.h" #define BRC_STRLEN 15 /* Length of board name */ #define BRC_MAXSIZE 24576 @@ -653,26 +653,30 @@ static void dozap(int num){ zapbuf[ptr->bid-1] = (ptr->myattr&BRD_ZAP?0:login_start_time); } -void setutmpbid(int bid) +void delutmpbid(int bid, userinfo_t *utmp) { - int id=currutmp->brc_id; userinfo_t *u; - if(id) - { - if (brdshm->busystate!=1 && now-brdshm->busystate_b[id-1]>=10) + if (brdshm->busystate!=1 && now-brdshm->busystate_b[bid-1]>=10) { - brdshm->busystate_b[id-1]=now; - u=bcache[id-1].u; - if(u!=(void*)currutmp) + brdshm->busystate_b[bid-1]=now; + u=bcache[bid-1].u; + if(u!=(void*)utmp) { - for(;u && u->nextbfriend != (void*)currutmp; u=u->nextbfriend); - if(u) u->nextbfriend = currutmp->nextbfriend; + for(;u && u->nextbfriend != (void*)utmp; u=u->nextbfriend); + if(u) u->nextbfriend = utmp->nextbfriend; } else - bcache[id-1].u=currutmp->nextbfriend; - if(bcache[id-1].nuser>0) bcache[id-1].nuser--; - brdshm->busystate_b[id-1]=0; + bcache[bid-1].u=utmp->nextbfriend; + if(bcache[bid-1].nuser>0) bcache[bid-1].nuser--; + brdshm->busystate_b[bid-1]=0; } +} + +void setutmpbid(int bid) +{ + if(currutmp->brc_id) + { + delutmpbid(currutmp->brc_id, currutmp); } if(bid) { |