diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 2 | ||||
-rw-r--r-- | mbbsd/menu.c | 50 | ||||
-rw-r--r-- | mbbsd/ordersong.c | 6 | ||||
-rw-r--r-- | mbbsd/register.c | 12 | ||||
-rw-r--r-- | mbbsd/user.c | 2 | ||||
-rw-r--r-- | mbbsd/xyz.c | 2 |
6 files changed, 42 insertions, 32 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 108cd39f..8e7e8edb 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1168,7 +1168,7 @@ show_brdlist(int head, int clsflag, int newflag) currstat = CLASS; myrow = 6; showtitle("分類看板", BBSName); - movie(0); + adbanner(0); move(1, 0); // TODO remove ascii art here outs( diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 069107b1..b1ce89f1 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -234,45 +234,45 @@ show_status(void) } /* - * current caller of movie: - * board.c: movie(0); // called when IN_CLASSROOT() - * // with currstat = CLASS -> don't show movies - * xyz.c: movie(999999); // logout - * menu.c: movie(cmdmode); // ... + * current caller of adbanner: + * board.c: adbanner(0); // called when IN_CLASSROOT() + * // with currstat = CLASS -> don't show adbanners + * xyz.c: adbanner(999999); // logout + * menu.c: adbanner(cmdmode); // ... */ -#define N_SYSMOVIE (sizeof(movie_map) / sizeof(movie_map[0])) +#define N_SYSADBANNER (sizeof(adbanner_map) / sizeof(adbanner_map[0])) void -movie(int cmdmode) +adbanner(int cmdmode) { int i; - // movie 前幾筆是 Note 板精華區「<系統> 動態看板」(SYS) 目錄下的文章 - // movie_map 是用來依 cmdmode 挑出特定的動態看板,index 跟 mode_map 一樣。 - const int movie_map[] = { + // adbanner 前幾筆是 Note 板精華區「<系統> 動態看板」(SYS) 目錄下的文章 + // adbanner_map 是用來依 cmdmode 挑出特定的動態看板,index 跟 mode_map 一樣。 + const int adbanner_map[] = { 2, 10, 11, -1, 3, -1, 12, 7, 9, 8, 4, 5, 6, }; - // don't show if stat in class or user wants to skip movies - if (currstat == CLASS || !(cuser.uflag & MOVIE_FLAG)) + // don't show if stat in class or user wants to skip adbanners + if (currstat == CLASS || !(cuser.uflag & ADBANNER_FLAG)) return; // also prevent SHM busy status if (SHM->Pbusystate || SHM->last_film <= 0) return; - if (cmdmode < N_SYSMOVIE && - 0 < movie_map[cmdmode] && movie_map[cmdmode] <= SHM->last_film) { - i = movie_map[cmdmode]; + if (cmdmode < N_SYSADBANNER && + 0 < adbanner_map[cmdmode] && adbanner_map[cmdmode] <= SHM->last_film) { + i = adbanner_map[cmdmode]; } else if (cmdmode == 999999) { /* Goodbye my friend */ i = 0; } else { // do not use random. we work in slide show mode. // since menu is updated per hour, the total presentation time - // should be less than one hour. 3600/MAX_MOVIE(500)=7. + // should be less than one hour. 3600/MAX_ADBANNER(500)=7. // syncnow(); - if (SHM->last_film > N_SYSMOVIE) - i = N_SYSMOVIE + (now / (3600 / MAX_MOVIE) ) % - (SHM->last_film+1-N_SYSMOVIE); + if (SHM->last_film > N_SYSADBANNER) + i = N_SYSADBANNER + (now / (3600 / MAX_ADBANNER) ) % + (SHM->last_film+1-N_SYSADBANNER); else i = 0; // SHM->last_film; } @@ -298,12 +298,12 @@ typedef struct { } commands_t; static int -show_menu(int moviemode, const commands_t * p) +show_menu(int adbannermode, const commands_t * p) { register int n = 0; register char *s; - movie(moviemode); + adbanner(adbannermode); // seems not everyone likes the menu in center. #ifdef LARGETERM_CENTER_MENU @@ -337,11 +337,11 @@ static const int mode_map[] = { static void domenu(int cmdmode, const char *cmdtitle, int cmd, const commands_t cmdtable[]) { - int lastcmdptr, moviemode; + int lastcmdptr, adbannermode; int n, pos, total, i; int err; - moviemode = cmdmode; + adbannermode = cmdmode; assert(cmdmode < M_XMAX); cmdmode = mode_map[cmdmode]; @@ -349,7 +349,7 @@ domenu(int cmdmode, const char *cmdtitle, int cmd, const commands_t cmdtable[]) showtitle(cmdtitle, BBSName); - total = show_menu(moviemode, cmdtable); + total = show_menu(adbannermode, cmdtable); show_status(); lastcmdptr = pos = 0; @@ -471,7 +471,7 @@ domenu(int cmdmode, const char *cmdtitle, int cmd, const commands_t cmdtable[]) if (refscreen) { showtitle(cmdtitle, BBSName); - show_menu(moviemode, cmdtable); + show_menu(adbannermode, cmdtable); show_status(); refscreen = NA; } diff --git a/mbbsd/ordersong.c b/mbbsd/ordersong.c index d8122541..11918729 100644 --- a/mbbsd/ordersong.c +++ b/mbbsd/ordersong.c @@ -8,7 +8,7 @@ #define OSONGPATH "etc/SONGO" #define ORDER_SONG_COST (200) // how much to order a song -#define MAX_SONGS (MAX_MOVIE-100) // (400) XXX MAX_SONGS should be fewer than MAX_MOVIE. +#define MAX_SONGS (MAX_ADBANNER-100) // (400) XXX MAX_SONGS should be fewer than MAX_ADBANNER. static void sortsong(void); @@ -149,13 +149,13 @@ do_order_song(void) if (append_record(OSONGPATH "/" FN_DIR, &mail, sizeof(mail)) != -1) { pwcuSetLastSongTime(now); - /* Jaky 超過 MAX_MOVIE 首歌就開始砍 */ + /* Jaky 超過 MAX_ADBANNER 首歌就開始砍 */ // XXX 載入的順序會長得像是: // 3. ◆ <系統> 動態看板 SYSOP [01/23/08] // 4. ◆ <點歌> 動態看板 Ptt [08/26/09] // 5. ◆ <廣告> 動態看板 SYSOP [08/22/09] // 6. ◆ <看板> 動態看板 SYSOP [04/16/09] - // 由於點歌部份算是早載入的,不能直接用 MAX_MOVIE 不然後面都沒得玩。 + // 由於點歌部份算是早載入的,不能直接用 MAX_ADBANNER 不然後面都沒得玩。 nsongs = get_num_records(OSONGPATH "/" FN_DIR, sizeof(mail)); if (nsongs > MAX_SONGS) { // XXX race condition diff --git a/mbbsd/register.c b/mbbsd/register.c index fcca3b6b..a81c8db5 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -653,12 +653,22 @@ new_register(void) memset(&newuser, 0, sizeof(newuser)); newuser.version = PASSWD_VERSION; newuser.userlevel = PERM_DEFAULT; - newuser.uflag = BRDSORT_FLAG | MOVIE_FLAG; + newuser.uflag = BRDSORT_FLAG | ADBANNER_FLAG; newuser.uflag2 = 0; newuser.firstlogin = newuser.lastlogin = now; newuser.pager = PAGER_ON; strlcpy(newuser.lasthost, fromhost, sizeof(newuser.lasthost)); + // XXX enable this when we complete the user flag of ADBANNER_USONG_FLAG. +#if 0 + clear(); + prints( "\n\t在使用 BBS 的過程中,您可能會在畫面上方看到一些動態的活動看板告示,\n" + "\n\t其內容是開放給各使用者申請的,所以包含非商業的活動訊息、各種使用者的\n" + "\n\t心情點播或政治言論;但這些文字與圖像並不代表站方立場。\n"); + if (vans("請問您希望看到此類使用者心情點播嗎? [y/N]: ") == 'y') + newuser.uflag |= ADBANNER_USONG_FLAG; +#endif + #ifdef DBCSAWARE if(u_detectDBCSAwareEvilClient()) newuser.uflag &= ~DBCSAWARE_FLAG; diff --git a/mbbsd/user.c b/mbbsd/user.c index c71cf6fe..a08217e5 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -367,7 +367,7 @@ void Customize(void) /* cuser.uflag settings */ static const unsigned int masks1[] = { - MOVIE_FLAG, + ADBANNER_FLAG, NO_MODMARK_FLAG , COLORED_MODMARK, #ifdef DBCSAWARE diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index 7f52a28d..6c1eaf04 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -263,7 +263,7 @@ Goodbye(void) if (*genbuf != 'y') return 0; - movie(999999); + adbanner(999999); if (cuser.userlevel) { getdata(b_lines - 1, 0, "(G)隨風而逝 (M)托夢站長 (N)酸甜苦辣流言板?[G] ", |