summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c56
-rw-r--r--mbbsd/cal.c2
-rw-r--r--mbbsd/chicken.c15
-rw-r--r--mbbsd/edit.c2
-rw-r--r--mbbsd/gamble.c4
-rw-r--r--mbbsd/kaede.c1
-rw-r--r--mbbsd/menu.c28
-rw-r--r--mbbsd/screen.c4
-rw-r--r--mbbsd/syspost.c4
-rw-r--r--mbbsd/talk.c10
-rw-r--r--mbbsd/user.c10
-rw-r--r--mbbsd/var.c4
-rw-r--r--mbbsd/voteboard.c2
13 files changed, 77 insertions, 65 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index ad101bb5..934cf3e9 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -68,12 +68,13 @@ anticrosspost(void)
ANSI_COLOR(37;45) "cross post 文章 "
ANSI_COLOR(37) " %s" ANSI_RESET "\n",
cuser.userid, ctime4(&now));
- post_violatelaw(cuser.userid, "Ptt系統警察", "Cross-post", "罰單處份");
+ post_violatelaw(cuser.userid, BBSMNAME "系統警察",
+ "Cross-post", "罰單處份");
cuser.userlevel |= PERM_VIOLATELAW;
cuser.timeviolatelaw = now;
cuser.vl_count++;
mail_id(cuser.userid, "Cross-Post罰單",
- "etc/crosspost.txt", "Ptt警察部隊");
+ "etc/crosspost.txt", BBSMNAME "警察部隊");
if ((now - cuser.firstlogin) / 86400 < 14)
delete_allpost(cuser.userid);
kick_all(cuser.userid); // XXX: in2: wait for testing
@@ -349,33 +350,31 @@ readdoent(int num, fileheader_t * ent)
if ((currmode & MODE_BOARD) && (ent->filemode & FILE_DIGEST))
type = (type == ' ') ? '*' : '#';
- else if (currmode & MODE_BOARD || HasUserPerm(PERM_LOGINOK)) {
+ else if (currmode & MODE_BOARD || HasUserPerm(PERM_LOGINOK))
+ {
if (ent->filemode & FILE_MARKED)
- {
- if(ent->filemode & FILE_SOLVED)
- type = '!';
- else
+ {
+ if(ent->filemode & FILE_SOLVED)
+ type = '!';
+ else if (isunread == 0)
+ type = 'm';
+ else if (isunread == 1)
+ type = 'M';
+ else if (isunread == 2 &&
+ !(cuser.uflag & NO_MODMARK_FLAG))
{
- if (isunread == 0)
- type = 'm';
- else if (isunread == 1)
- type = 'M';
- else if (isunread == 2)
+ if (cuser.uflag & COLORED_MODMARK)
{
- // modified mark
- if (!(cuser.uflag & NO_MODMARK_FLAG))
- {
- if (cuser.uflag & COLORED_MODMARK)
- {
- typeattr = ANSI_COLOR(36);
- type = 'm';
- } else {
- type = '=';
- }
- }
+ typeattr = ANSI_COLOR(36);
+ type = 'm';
+ } else {
+ // some user suggests 'n' for shaping like 'm'.
+ // also makes sense.
+ // type = 'n'; // 'N'
+ type = '=';
}
}
- }
+ }
else if (TagNum && !Tagger(atoi(ent->filename + 2), 0, TAG_NIN))
type = 'D';
else if (ent->filemode & FILE_SOLVED)
@@ -432,6 +431,7 @@ readdoent(int num, fileheader_t * ent)
else
/* recently we found that many boards have >10k articles,
* so it's better to use 5+2 (2 for cursor marker) here.
+ * XXX if we are in big term, enlarge here.
*/
prints("%7d", num);
@@ -2809,8 +2809,10 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
if (!(inc_badpost(userid, 1) % 5)){
userec_t xuser;
- post_violatelaw(userid, "Ptt 系統警察", "劣文累計 5 篇", "罰單一張");
- mail_violatelaw(userid, "Ptt 系統警察", "劣文累計 5 篇", "罰單一張");
+ post_violatelaw(userid, BBSMNAME " 系統警察",
+ "劣文累計 5 篇", "罰單一張");
+ mail_violatelaw(userid, BBSMNAME " 系統警察",
+ "劣文累計 5 篇", "罰單一張");
kick_all(userid);
passwd_query(tusernum, &xuser);
xuser.money = moneyof(tusernum);
@@ -2831,7 +2833,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
setbpath(report_path, BAD_POST_RECORD);
stampfile(report_path, &report_fh);
- strcpy(report_fh.owner, "[Ptt警察局]");
+ strcpy(report_fh.owner, "[" BBSMNAME "警察局]");
snprintf(report_fh.title, sizeof(report_fh.title),
"%s 板 %s 板主給予 %s 一篇劣文",
currboard, cuser.userid, userid);
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index b99d89e4..d44b5b58 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -91,7 +91,7 @@ vice(int money, const char *item)
}
snprintf(buf, sizeof(buf),
"%s 花了$%d 編號[%08d]", item, money, viceserial);
- mail_id(cuser.userid, buf, "etc/vice.txt", "Ptt經濟部");
+ mail_id(cuser.userid, buf, "etc/vice.txt", BBSMNAME "經濟部");
return 0;
}
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index f73d8c5a..6fcffba3 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -105,7 +105,8 @@ new_chicken(void)
clear();
move(2, 0);
- outs("歡迎光臨 " ANSI_COLOR(33) "◎" ANSI_COLOR(37;44) " Ptt寵物市場 " ANSI_COLOR(33;40) "◎" ANSI_RESET ".. "
+ outs("歡迎光臨 " ANSI_COLOR(33) "◎" ANSI_COLOR(37;44) " "
+ BBSMNAME "寵物市場 " ANSI_COLOR(33;40) "◎" ANSI_RESET ".. "
"目前蛋價:\n"
"(a)小雞 $5 (b)美少女 $25 (c)勇士 $30 (d)蜘蛛 $40 "
"(e)恐龍 $80\n"
@@ -203,7 +204,7 @@ show_chicken_data(chicken_t * thechicken, chicken_t * pkchicken)
/* Ptt:debug */
thechicken->type %= NUM_KINDS;
clear();
- showtitle(pkchicken ? "Ptt鬥雞場" : "Ptt養雞場", BBSName);
+ showtitle(pkchicken ? BBSMNAME2 "鬥雞場" : BBSMNAME2 "養雞場", BBSName);
move(1, 0);
show_chicken_stat(thechicken, age);
@@ -833,15 +834,17 @@ recover_chicken(chicken_t * thechicken)
thechicken->satis = 2;
vice(money, "靈界守衛");
snprintf(buf, sizeof(buf),
- ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45) " OK了 記得餵他點東西 "
- "不然可能失效 念在我也有玩Ptt 拿你%d就好 " ANSI_RESET, money);
+ ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45)
+ " OK了 記得餵他點東西 不然可能失效 "
+ "念在我也有玩BBS 拿你%d就好 " ANSI_RESET, money);
outmsg(buf);
bell();
igetch();
return 1;
}
- outmsg(ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45) " 竟然說我坑人! 這年頭命真不值錢 "
- "除非我再來找你 你再也沒機會了 " ANSI_RESET);
+ outmsg(ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45)
+ " 竟然說我坑人! 這年頭命真不值錢 "
+ "除非我再來找你 你再也沒機會了 " ANSI_RESET);
bell();
igetch();
thechicken->lastvisit = 0;
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 8063b0cf..c2bdfe6a 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -2793,7 +2793,7 @@ vedit(char *fpath, int saveheader, int *islocal)
log_file("etc/illegal_money", LOG_CREAT | LOG_VF,
ANSI_COLOR(1;33;46) "%s " ANSI_COLOR(37;45) " 用機器人發表文章 " ANSI_COLOR(37) " %s" ANSI_RESET "\n",
cuser.userid, ctime4(&now));
- post_violatelaw(cuser.userid, "Ptt系統警察",
+ post_violatelaw(cuser.userid, BBSMNAME "系統警察",
"用機器人發表文章", "強制離站");
abort_bbs(0);
*/
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c
index 049bda74..3229b906 100644
--- a/mbbsd/gamble.c
+++ b/mbbsd/gamble.c
@@ -38,7 +38,7 @@ show_ticket_data(char betname[MAX_ITEM][MAX_ITEM_LEN],const char *direct, int *p
} else
showtitle(genbuf, BBSNAME);
} else
- showtitle("Ptt賭盤", BBSNAME);
+ showtitle(BBSMNAME "賭盤", BBSNAME);
move(2, 0);
snprintf(genbuf, sizeof(genbuf), "%s/" FN_TICKET_ITEMS, direct);
if (!(fp = fopen(genbuf, "r"))) {
@@ -349,7 +349,7 @@ openticket(int bid)
if ((uid = searchuser(userid, userid)) == 0)
continue;
deumoney(uid, money * i);
- mail_id(userid, buf, "etc/ticket.win", "Ptt賭場");
+ mail_id(userid, buf, "etc/ticket.win", BBSMNAME "賭場");
}
fclose(fp1);
}
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c
index c4a9768b..bc08ae3d 100644
--- a/mbbsd/kaede.c
+++ b/mbbsd/kaede.c
@@ -86,7 +86,6 @@ Rename(const char *src, const char *dst)
if (rename(src, dst) == 0)
return 0;
if (!strchr(src, ';') && !strchr(dst, ';'))
- // Ptt 防不正常指令 // XXX 這樣是不夠的
{
pid_t pid = fork();
if (pid == 0)
diff --git a/mbbsd/menu.c b/mbbsd/menu.c
index 33538753..ac31b010 100644
--- a/mbbsd/menu.c
+++ b/mbbsd/menu.c
@@ -149,7 +149,7 @@ show_status(void)
"生日要請客唷" : SHM->today_is,
SHM->UTMPnumber, cuser.userid);
outmsg(mystatus);
- i = strlen(mystatus) - (3*7+25);
+ i = strlen(mystatus) - (3*7+25); // 3 = ANSI_COLOR, 25 = stuff inside
sprintf(mystatus, "[扣機]" ANSI_COLOR(31) "%s ",
msgs[currutmp->pager]);
outslr("", i, mystatus, strlen(msgs[currutmp->pager]) + 7);
@@ -557,7 +557,7 @@ int main_menu(void) {
}
static int p_money() {
- domenu(M_PSALE, "Ptt量販店", '0', moneylist);
+ domenu(M_PSALE, BBSMNAME2 "量販店", '0', moneylist);
return 0;
};
@@ -572,7 +572,7 @@ const static commands_t jceelist[] = {
};
static int m_jcee() {
- domenu(M_JCEE, "Ptt查榜系統", '0', jceelist);
+ domenu(M_JCEE, BBSMNAME2 "查榜系統", '0', jceelist);
return 0;
}
#endif
@@ -593,13 +593,17 @@ static const commands_t playlist[] = {
/* {x_weather,0 , "WWeather 【 氣象預報 】"}, */
/* XXX 壞掉了 */
/* {x_stock,0 , "SStock 【 股市行情 】"},*/
- {forsearch,PERM_LOGINOK, "SSearchEngine【" ANSI_COLOR(1;35) " Ptt搜尋器 " ANSI_RESET "】"},
+ {forsearch,PERM_LOGINOK, "SSearchEngine【" ANSI_COLOR(1;35) " "
+ BBSMNAME2 "搜尋器 " ANSI_RESET "】"},
{topsong,PERM_LOGINOK, "TTop Songs 【" ANSI_COLOR(1;32) " 點歌排行榜 " ANSI_RESET "】"},
- {p_money,PERM_LOGINOK, "PPay 【" ANSI_COLOR(1;31) " Ptt量販店 " ANSI_RESET "】"},
+ {p_money,PERM_LOGINOK, "PPay 【" ANSI_COLOR(1;31) " "
+ BBSMNAME2 "量販店 " ANSI_RESET "】"},
{chicken_main,PERM_LOGINOK, "CChicken "
- "【" ANSI_COLOR(1;34) " Ptt養雞場 " ANSI_RESET "】"},
- {playground,PERM_LOGINOK, "AAmusement 【" ANSI_COLOR(1;33) " Ptt遊樂場 " ANSI_RESET "】"},
- {chessroom, PERM_LOGINOK, "BBChess 【" ANSI_COLOR(1;34) " Ptt棋院 " ANSI_RESET "】"},
+ "【" ANSI_COLOR(1;34) " " BBSMNAME2 "養雞場 " ANSI_RESET "】"},
+ {playground,PERM_LOGINOK, "AAmusement 【" ANSI_COLOR(1;33) " "
+ BBSMNAME2 "遊樂場 " ANSI_RESET "】"},
+ {chessroom, PERM_LOGINOK, "BBChess 【" ANSI_COLOR(1;34) " "
+ BBSMNAME2 "棋院 " ANSI_RESET "】"},
{NULL, 0, NULL}
};
@@ -617,7 +621,7 @@ static const commands_t chesslist[] = {
};
static int chessroom() {
- domenu(M_CHC, "Ptt棋院", '1', chesslist);
+ domenu(M_CHC, BBSMNAME2 "棋院", '1', chesslist);
return 0;
}
@@ -626,7 +630,7 @@ static const commands_t plist[] = {
/* {p_ticket_main, PERM_LOGINOK,"00Pre 【 總統機 】"},
{alive, PERM_LOGINOK, "00Alive 【 訂票雞 】"},
*/
- {ticket_main, PERM_LOGINOK, "11Gamble 【 Ptt賭場 】"},
+ {ticket_main, PERM_LOGINOK, "11Gamble 【 " BBSMNAME2 "賭場 】"},
{guess_main, PERM_LOGINOK, "22Guess number【 猜數字 】"},
{othello_main, PERM_LOGINOK, "33Othello 【 黑白棋 】"},
// {dice_main, PERM_LOGINOK, "44Dice 【 玩骰子 】"},
@@ -638,7 +642,7 @@ static const commands_t plist[] = {
};
static int playground() {
- domenu(M_AMUSE, "Ptt遊樂場",'1',plist);
+ domenu(M_AMUSE, BBSMNAME2 "遊樂場",'1',plist);
return 0;
}
@@ -651,7 +655,7 @@ static const commands_t slist[] = {
};
static int forsearch() {
- domenu(M_SREG, "Ptt搜尋器", '1', slist);
+ domenu(M_SREG, BBSMNAME2 "搜尋器", '1', slist);
return 0;
}
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index a9af6747..e508ece2 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -401,7 +401,9 @@ outs_n(const char *str, int n)
outc(*str++);
}
}
-//
+
+// XXX left-right (for large term)
+// TODO someday please add ANSI detection version
void
outslr(const char *left, int leftlen, const char *right, int rightlen)
{
diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c
index 13e71390..029c23a7 100644
--- a/mbbsd/syspost.c
+++ b/mbbsd/syspost.c
@@ -114,7 +114,7 @@ post_violatelaw(const char *crime, const char *police, const char *reason, const
police, crime, reason, result);
if (!strstr(police, "警察")) {
- post_msg("PoliceLog", title, msg, "[Ptt法院]");
+ post_msg("PoliceLog", title, msg, "[" BBSMNAME "法院]");
snprintf(msg, sizeof(msg),
ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n"
@@ -123,7 +123,7 @@ post_violatelaw(const char *crime, const char *police, const char *reason, const
"站務警察", crime, reason, result);
}
- post_msg("ViolateLaw", title, msg, "[Ptt法院]");
+ post_msg("ViolateLaw", title, msg, "[" BBSMNAME "法院]");
}
void
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index b518f1a7..31694b34 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1083,10 +1083,12 @@ t_display(void)
if (more(genbuf, YEA) != -1) {
move(b_lines - 4, 0);
clrtobot();
- outs(ANSI_COLOR(1;33;45) "★現在 Ptt提供創新的水球整理程式★" ANSI_RESET "\n"
- "您將水球存至信箱後, 在【郵件選單】該信件前按 u,\n"
- "系統即會將您的水球紀錄重新整理後寄送給您唷! \n");
- getdata(b_lines - 1, 0, "清除(C) 移至備忘錄(M) 保留(R) (C/M/R)?[R]",
+
+ outs(ANSI_COLOR(1;33;45) "★水球整理程式 " ANSI_RESET "\n"
+ "提醒您: 可將水球存入信箱(M)後, 到【郵件選單】該信件前按 u,\n"
+ "系統會將水球紀錄重新整理後寄送給您唷! " ANSI_RESET "\n");
+
+ getdata(b_lines - 1, 0, "清除(C) 存入信箱(M) 保留(R) (C/M/R)?[R]",
ans, sizeof(ans), LCECHO);
if (*ans == 'm') {
fileheader_t mymail;
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 29b6d030..c8a7943b 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -236,7 +236,7 @@ mail_violatelaw(const char *crime, const char *police, const char *reason, const
stampfile(genbuf, &fhdr);
if (!(fp = fopen(genbuf, "w")))
return;
- fprintf(fp, "作者: [Ptt警察局]\n"
+ fprintf(fp, "作者: [" BBSMNAME "警察局]\n"
"標題: [報告] 違法報告\n"
"時間: %s\n"
ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n " ANSI_COLOR(1;32) "%s" ANSI_RESET
@@ -245,7 +245,7 @@ mail_violatelaw(const char *crime, const char *police, const char *reason, const
ctime4(&now), police, crime, reason, result);
fclose(fp);
strcpy(fhdr.title, "[報告] 違法判決報告");
- strcpy(fhdr.owner, "[Ptt警察局]");
+ strcpy(fhdr.owner, "[" BBSMNAME "警察局]");
sethomedir(genbuf, crime);
append_record(genbuf, &fhdr, sizeof(fhdr));
}
@@ -337,7 +337,7 @@ void Customize(void)
static const char* desc1[] = {
"動態看板",
"隱藏文章修改符號(推文/修文) (~)",
- "改用彩色修改符號 (+)",
+ "改用色彩代替修改符號 (+)",
#ifdef DBCSAWARE
"自動偵測雙位元字集(如全型中文)",
#endif
@@ -355,7 +355,7 @@ void Customize(void)
static const char* desc2[] = {
"拒收站外信",
"新板自動進我的最愛",
- "停用變色顯示我的最愛",
+ "單色顯示我的最愛",
0,
};
@@ -1117,7 +1117,7 @@ showplans_userec(userec_t *user)
if(user->userlevel & PERM_VIOLATELAW)
{
- outs(" \033[1;31m此人違規 尚未繳交罰單\033[m");
+ outs(" " ANSI_COLOR(1;31) "此人違規 尚未繳交罰單" ANSI_RESET);
return;
}
diff --git a/mbbsd/var.c b/mbbsd/var.c
index ecf91169..2b5e006e 100644
--- a/mbbsd/var.c
+++ b/mbbsd/var.c
@@ -195,7 +195,7 @@ char * const ModeTypeTable[MAX_MODES] = {
"分類看板", /* CLASS */
"Play選單", /* PMENU */
"編特別名單", /* NMENU */
- "Ptt量販店", /* PSALE */
+ BBSMNAME2 "量販店", /* PSALE */
"發表文章", /* POSTING */
"看板列表", /* READBRD */
"閱\讀文章", /* READING */
@@ -263,7 +263,7 @@ char * const ModeTypeTable[MAX_MODES] = {
"下象棋", /* CHC */
"下暗棋", /* DARK */
"NBA大猜測", /* TMPJACK */
- "Ptt查榜系統", /* JCEE */
+ BBSMNAME2 "查榜系統", /* JCEE */
"重編文章", /* REEDIT */
"部落格", /* BLOGGING */
"看棋", /* CHESSWATCHING */
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c
index 1e983391..3d28fe16 100644
--- a/mbbsd/voteboard.c
+++ b/mbbsd/voteboard.c
@@ -215,7 +215,7 @@ do_voteboard(int type)
}
move(0, 0);
clrtobot();
- outs("您正在使用 PTT 的連署系統\n");
+ outs("您正在使用" BBSNAME "的連署系統\n");
outs("本連署系統將詢問您一些問題,請小心回答才能開始連署\n");
outs("任意提出連署案者,將被列入不受歡迎使用者喔\n");
move(4, 0);