diff options
Diffstat (limited to 'util/hotboard.c')
-rw-r--r-- | util/hotboard.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/util/hotboard.c b/util/hotboard.c index ff4c0e88..3a895e5f 100644 --- a/util/hotboard.c +++ b/util/hotboard.c @@ -13,6 +13,13 @@ struct bs { boardheader_t *b; } *brd; +#define isvisiableboard(bptr) \ + ((bptr)->brdname[0] && \ + !(((bptr)->brdattr & (BRD_HIDE | BRD_TOP)) || \ + ((bptr)->level && !((bptr)->brdattr & BRD_POSTMASK) && \ + ((bptr)->level & \ + ~(PERM_BASIC|PERM_CHAT|PERM_PAGE|PERM_POST|PERM_LOGINOK))))) + int main(int argc, char **argv) { int ch, topn = 20, i, nbrds, j, k, nusers; @@ -40,8 +47,8 @@ int main(int argc, char **argv) nbrds = 1; for( i = 1 ; i < MAX_BOARD ; ++i ) - if( nbrds != topn || - (SHM->bcache[i].brdname[0] && + if( (isvisiableboard(&SHM->bcache[i])) && + (nbrds != topn || SHM->bcache[i].nuser > brd[nbrds - 1].nusers) ){ nusers = SHM->bcache[i].nuser; // no race ? |