diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/announce.c | 2 | ||||
-rw-r--r-- | mbbsd/bbs.c | 2 | ||||
-rw-r--r-- | mbbsd/board.c | 2 | ||||
-rw-r--r-- | mbbsd/cache.c | 10 | ||||
-rw-r--r-- | mbbsd/edit.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index 4f6b9af0..bf6c8add 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -977,7 +977,7 @@ isvisible_man(const menu_t * me) /* board friend only effact when * in board reading mode */ (currstat == ANNOUNCE || - hbflcheck(currbid, currutmp->uid)) + !is_hidden_board_friend(currbid, currutmp->uid)) ))) return 0; return 1; diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index a69b5c7d..55ddb14f 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -188,7 +188,7 @@ set_board(void) if( HasUserPerm(PERM_SYSOP) && (bp->brdattr & BRD_HIDE) && !is_BM_cache(bp - bcache + 1) && - hbflcheck((int)(bp - bcache) + 1, currutmp->uid) ) + !is_hidden_board_friend((int)(bp - bcache) + 1, currutmp->uid) ) vmsg("進入未經授權看板"); board_note_time = &bp->bupdate; diff --git a/mbbsd/board.c b/mbbsd/board.c index 9681edf9..adfa19ef 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -161,7 +161,7 @@ HasBoardPerm(boardheader_t *bptr) /* 祕密看板:核對首席板主的好友名單 */ if (brdattr & BRD_HIDE) { /* 隱藏 */ - if (hbflcheck((int)(bptr - bcache) + 1, currutmp->uid)) { + if (!is_hidden_board_friend((int)(bptr - bcache) + 1, currutmp->uid)) { if (brdattr & BRD_POSTMASK) return 0; else diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 764aac72..5c4cb7af 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -788,7 +788,7 @@ haspostperm(const char *bname) if (bcache[i - 1].brdattr & BRD_HIDE) return 1; else if (bcache[i - 1].brdattr & BRD_RESTRICTEDPOST && - hbflcheck(i, usernum)) + !is_hidden_board_friend(i, usernum)) return 0; i = bcache[i - 1].level; @@ -1034,9 +1034,9 @@ hbflreload(int bid) memcpy(SHM->hbfl[bid-1], hbfl, sizeof(hbfl)); } -/* 是否"不"通過板友測試. 如果在板友名單中的話傳回 0, 否則為 1 */ +/* 是否通過板友測試. 如果在板友名單中的話傳回 1, 否則為 0 */ int -hbflcheck(int bid, int uid) +is_hidden_board_friend(int bid, int uid) { int i; @@ -1045,9 +1045,9 @@ hbflcheck(int bid, int uid) hbflreload(bid); for (i = 1; SHM->hbfl[bid-1][i] != 0 && i <= MAX_FRIEND; ++i) { if (SHM->hbfl[bid-1][i] == uid) - return 0; + return 1; } - return 1; + return 0; } #ifdef USE_COOLDOWN diff --git a/mbbsd/edit.c b/mbbsd/edit.c index a0e7dac2..d9151031 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1678,7 +1678,7 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle) } curr_buf->currline = NULL; - if (postrecord.times > MAX_CROSSNUM-1 && hbflcheck(currbid, currutmp->uid)) + if (postrecord.times > MAX_CROSSNUM-1 && !is_hidden_board_friend(currbid, currutmp->uid)) anticrosspost(); if (po && sum == 3) { |