diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-25 14:12:12 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-25 14:12:12 +0800 |
commit | 850ea1b719c582d0a511aa1b5eca5f6b2a0173a0 (patch) | |
tree | 41438ae634633fdd735b29e29fc87aa92106ae8c /mbbsd | |
parent | f2ac108f484ad739dc251bf0b1f43f29e6dfc3c7 (diff) | |
download | pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar.gz pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar.bz2 pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar.lz pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar.xz pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.tar.zst pttbbs-850ea1b719c582d0a511aa1b5eca5f6b2a0173a0.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@213 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 25 | ||||
-rw-r--r-- | mbbsd/var.c | 4 |
2 files changed, 21 insertions, 8 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 58c01601..56ca1f01 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.16 2002/05/24 19:05:47 ptt Exp $ */ +/* $Id: board.c,v 1.17 2002/05/25 06:11:38 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -427,6 +427,10 @@ static boardstat_t * addnewbrdstat(int n, int state) return ptr; } +static int cmpboardname(boardstat_t *brd, boardstat_t *tmp) { + return brd->bh->nuser- tmp->bh->nuser; +} + static void load_boards(char *key) { boardheader_t *bptr = NULL; int type=cuser.uflag & BRDSORT_FLAG?1:0; @@ -440,7 +444,7 @@ static void load_boards(char *key) { load_uidofgid(class_bid,type); } brdnum = 0; - if(class_bid==0) + if(class_bid<=0) { nbrd = (boardstat_t *)malloc(numboards * sizeof(boardstat_t)); for(i=0 ; i < numboards; i++) @@ -452,9 +456,12 @@ static void load_boards(char *key) { !((state = Ben_Perm(bptr)) || (currmode & MODE_MENU)) || (yank_flag == 0 && !(favbuf[n]&BRD_FAV)) || (yank_flag == 1 && !zapbuf[n]) || - (key[0] && !strcasestr(bptr->title, key)) + (key[0] && !strcasestr(bptr->title, key)) || + (class_bid=-1 && !bptr->nuser) ) continue; addnewbrdstat(n, state); + if(class_bid=-1) + qsort(nbrd, brdnum, sizeof(boardstat_t), cmpboardname); } } else @@ -617,10 +624,12 @@ static void show_brdlist(int head, int clsflag, int newflag) { if (ptr->bh->brdattr & BRD_BAD) prints(" X "); - else if(ptr->bh->nuser>30) + else if(ptr->bh->nuser>=100) prints("\033[1;31mHOT\033[m"); - else if(ptr->bh->nuser>0) + else if(ptr->bh->nuser>50) prints("\033[1;31m%2d\033[m ",ptr->bh->nuser); + else if(ptr->bh->nuser>0) + prints("\033[1;33m%2d\033[m ",ptr->bh->nuser); else prints(" %c ", ptr->bh->bvote? 'V':' '); prints("%.13s", ptr->bh->BM); refresh(); @@ -1059,7 +1068,11 @@ static void choose_board(int newflag) { currmodetmp =currmode; tmp1=num; num=0; - class_bid = ptr->bid; + if(!(ptr->bh->brdattr & BRD_TOP)) + class_bid = ptr->bid; + else + class_bid = -1; /* 熱門群組用 */ + if (!(currmode & MODE_MENU))/*如果還沒有小組長權限 */ set_menu_BM(ptr->bh->BM); diff --git a/mbbsd/var.c b/mbbsd/var.c index 866ce063..ff2febf0 100644 --- a/mbbsd/var.c +++ b/mbbsd/var.c @@ -1,4 +1,4 @@ -/* $Id: var.c,v 1.3 2002/05/14 15:08:48 ptt Exp $ */ +/* $Id: var.c,v 1.4 2002/05/25 06:11:38 ptt Exp $ */ #include <stdio.h> #include <sys/types.h> #include "config.h" @@ -51,7 +51,7 @@ char *str_permboard[] = { "預設匿名版", /* BRD_DEFAULTANONYMOUS */ "違法改進中看版", /* BRD_BAD */ "連署專用看版", /* BRD_VOTEBOARD */ - "沒想到", + "熱門看板群組", /* BRD_TOP */ "沒想到", "沒想到", "沒想到", |