diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-09 00:18:04 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-09 00:18:04 +0800 |
commit | 085c9a93cf63c5511f28005deb06f8ba25c8b667 (patch) | |
tree | 2552708384e0221efed674c44ff03c83a4a54346 /mbbsd/board.c | |
parent | 8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a (diff) | |
download | pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.gz pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.bz2 pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.lz pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.xz pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.tar.zst pttbbs-085c9a93cf63c5511f28005deb06f8ba25c8b667.zip |
add "cool down" feature for boards.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2582 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r-- | mbbsd/board.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 3fb53483..ff3fb610 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -192,6 +192,23 @@ addnewbrdstat(int n, int state) static int cmpboardfriends(const void *brd, const void *tmp) { +#ifdef USE_COOLDOWN + if ((B_BH((boardstat_t*)tmp)->brdattr & BRD_COOLDOWN) && + (B_BH((boardstat_t*)brd)->brdattr & BRD_COOLDOWN)) + return 0; + else if ( B_BH((boardstat_t*)tmp)->brdattr & BRD_COOLDOWN ) { + if (B_BH((boardstat_t*)brd)->nuser == 0) + return 0; + else + return 1; + } + else if ( B_BH((boardstat_t*)brd)->brdattr & BRD_COOLDOWN ) { + if (B_BH((boardstat_t*)tmp)->nuser == 0) + return 0; + else + return -1; + } +#endif return ((B_BH((boardstat_t*)tmp)->nuser) - (B_BH((boardstat_t*)brd)->nuser)); } @@ -543,7 +560,13 @@ show_brdlist(int head, int clsflag, int newflag) B_BH(ptr)->title[3] + B_BH(ptr)->title[0]) & 07], B_BH(ptr)->title, B_BH(ptr)->title + 5, B_BH(ptr)->title + 7); +#ifdef USE_COOLDOWN + if (B_BH(ptr)->brdattr & BRD_COOLDOWN) + outs("ÀR "); + else if (B_BH(ptr)->brdattr & BRD_BAD) +#else if (B_BH(ptr)->brdattr & BRD_BAD) +#endif outs(" X "); else if (B_BH(ptr)->nuser >= 5000) outs("\033[1;34mÃz!\033[m"); |