diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-04 01:41:12 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-04 01:41:12 +0800 |
commit | beac874f4523ed2b32dd48c7d19ba42d43f24fe4 (patch) | |
tree | 50e8807647963d2a7543b2bab3e9c7be526a38f7 | |
parent | d706913fa35ffa57bdbeed7804f499763d179fc0 (diff) | |
download | pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar.gz pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar.bz2 pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar.lz pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar.xz pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.tar.zst pttbbs-beac874f4523ed2b32dd48c7d19ba42d43f24fe4.zip |
hbfl move to brdshm
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@74 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/pttstruct.h | 6 | ||||
-rw-r--r-- | mbbsd/cache.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index d2d5f59e..ea896dfd 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -1,4 +1,4 @@ -/* $Id: pttstruct.h,v 1.4 2002/03/19 16:03:23 ptt Exp $ */ +/* $Id: pttstruct.h,v 1.5 2002/04/03 17:41:10 in2 Exp $ */ #ifndef INCLUDE_STRUCT_H #define INCLUDE_STRUCT_H @@ -163,7 +163,6 @@ typedef struct uhash_t { int hash_head[1 << HASH_BITS]; int number; /* # of users total */ int loaded; /* .PASSWD has been loaded? */ - int hbfl[MAX_BOARD][MAX_FRIEND + 1]; } uhash_t; union xitem_t { @@ -240,11 +239,13 @@ typedef struct userinfo_t { unsigned short int five_win; unsigned short int five_lose; unsigned short int five_tie; + /* int myfavorite[FAVMAX]; char gfavorite[FAVGMAX][FAVGSLEN+1]; int ninGroup[FAVGMAX]; int nGroup; int ninRoot; + */ int mailalert; int sex; char color; @@ -293,6 +294,7 @@ typedef struct bcache_t { fileheader_t dircache[MAX_BOARD][DIRCACHESIZE]; int busystate_b[MAX_BOARD]; int total[MAX_BOARD]; + int hbfl[MAX_BOARD][MAX_FRIEND + 1]; time_t lastposttime[MAX_BOARD]; time_t uptime; time_t touchtime; diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 64b6bffe..bd380f19 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.4 2002/03/29 16:22:52 ptt Exp $ */ +/* $Id: cache.c,v 1.5 2002/04/03 17:41:12 in2 Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1004,17 +1004,17 @@ void hbflreload(int bid) fclose(fp); } hbfl[0] = time(NULL); - memcpy(uhash->hbfl[bid], hbfl, sizeof(hbfl)); + memcpy(brdshm->hbfl[bid], hbfl, sizeof(hbfl)); } int hbflcheck(int bid, int uid) { int i; - if( uhash->hbfl[bid][0] < login_start_time - HBFLexpire ) + if( brdshm->hbfl[bid][0] < login_start_time - HBFLexpire ) hbflreload(bid); - for( i = 1 ; uhash->hbfl[bid][i] != 0 && i <= MAX_FRIEND ; ++i ){ - if( uhash->hbfl[bid][i] == uid ) + for( i = 1 ; brdshm->hbfl[bid][i] != 0 && i <= MAX_FRIEND ; ++i ){ + if( brdshm->hbfl[bid][i] == uid ) return 0; } return 1; |