diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-20 17:11:02 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-20 17:11:02 +0800 |
commit | e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6 (patch) | |
tree | dabb30d58086dee8a1862008b5e247c701c9d4b6 | |
parent | a3367a1d78bdfc4edc37567745dd15d5f6c24192 (diff) | |
download | pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar.gz pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar.bz2 pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar.lz pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar.xz pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.tar.zst pttbbs-e91e8e5497b727c8161b6eaefd2e41fe5dfe22f6.zip |
Banner mapping is needed...
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4867 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/menu.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 34e601a5..462134ac 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -240,10 +240,16 @@ show_status(void) * xyz.c: adbanner(999999); // logout * menu.c: adbanner(cmdmode); // ... */ -#define N_SYSADBANNER 13 + +#define N_SYSADBANNER (sizeof(adbanner_map) / sizeof(adbanner_map[0])) void adbanner(int cmdmode) { + const int adbanner_map[] = { + 2, 10, 11, -1, 3, 1, 12, + 7, 9, 8, 4, 5, 6, + }; + int i; // adbanner 前幾筆是 Note 板精華區「<系統> 動態看板」(SYS) 目錄下的文章 @@ -255,7 +261,8 @@ adbanner(int cmdmode) if (SHM->Pbusystate || SHM->last_film <= 0) return; - if (cmdmode > 0 && cmdmode < N_SYSADBANNER && cmdmode < SHM->last_film) { + if (cmdmode > 0 && cmdmode < N_SYSADBANNER && + 0 < adbanner_map[cmdmode] && adbanner_map[cmdmode] <= SHM->last_film) { i = cmdmode; } else if (cmdmode == 999999) { /* Goodbye my friend */ i = 0; |