diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/admin.c | 6 | ||||
-rw-r--r-- | mbbsd/bbs.c | 10 | ||||
-rw-r--r-- | mbbsd/card.c | 16 | ||||
-rw-r--r-- | mbbsd/dice.c | 10 | ||||
-rw-r--r-- | mbbsd/gamble.c | 6 | ||||
-rw-r--r-- | mbbsd/guess.c | 22 | ||||
-rw-r--r-- | mbbsd/merge.c | 6 | ||||
-rw-r--r-- | mbbsd/talk.c | 2 |
8 files changed, 40 insertions, 38 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index f1f0b1d5..7509f235 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1434,7 +1434,7 @@ give_id_money(const char *user_id, int money, const char *mail_title) prints("id:%s money:%d 不對吧!!", user_id, money); pressanykey(); } else { - snprintf(tt, sizeof(tt), "%s : %d ptt 幣", mail_title, money); + snprintf(tt, sizeof(tt), "%s : %d " MONEYNAME " 幣", mail_title, money); mail_id(user_id, tt, "etc/givemoney.why", "[PTT 銀行]"); } } @@ -1502,7 +1502,7 @@ give_money(void) fprintf(fp2,"給 %s : %d\n", id, money); count++; } - sprintf(buf, "(%d人:%dP幣)", count, count*money); + sprintf(buf, "(%d人:%d"MONEYNAME"幣)", count, count*money); strcat(reason, buf); } else { if (!(fp = fopen("etc/givemoney.txt", "r+"))) { @@ -1523,7 +1523,7 @@ give_money(void) count++; } fclose(fp); - sprintf(buf, "(%d人:%dP幣)", count, total_money); + sprintf(buf, "(%d人:%d"MONEYNAME"幣)", count, total_money); strcat(reason, buf); } diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index af034a42..40e1a684 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -764,7 +764,8 @@ setupbidinfo(bid_t *bidinfo) bidinfo->buyitnow = atoi(buf); getdata_str(22,0, - "付款方式: 1.Ptt幣 2.郵局或銀行轉帳 3.支票或電匯 4.郵局貨到付款 [1]:", + "付款方式: 1." MONEYNAME "幣 2.郵局或銀行轉帳" + "3.支票或電匯 4.郵局貨到付款 [1]:", buf, 3, LCECHO,"1"); bidinfo->payby = (buf[0] - '1'); if( bidinfo->payby < 0 || bidinfo->payby > 3) @@ -777,7 +778,8 @@ setupbidinfo(bid_t *bidinfo) static void print_bidinfo(FILE *io, bid_t bidinfo) { - char *payby[4]={"Ptt幣", "郵局或銀行轉帳", "支票或電匯", "郵局貨到付款"}; + char *payby[4]={MONEYNAME "幣", "郵局或銀行轉帳", + "支票或電匯", "郵局貨到付款"}; if(io){ if( !bidinfo.userid[0] ) fprintf(io, "起標價: %-20d\n", bidinfo.high); @@ -1976,7 +1978,7 @@ hold_gamble(void) move(6, 0); snprintf(genbuf, sizeof(genbuf), "\n請到 %s 板 按'f'參與賭博!\n\n" - "一張 %d Ptt幣, 這是%s的賭博\n%s%s\n", + "一張 %d " MONEYNAME "幣, 這是%s的賭博\n%s%s\n", currboard, i, i < 100 ? "小賭式" : i < 500 ? "平民級" : i < 1000 ? "貴族級" : i < 5000 ? "富豪級" : "傾家蕩產", @@ -2191,7 +2193,7 @@ do_bid(int ent, fileheader_t * fhdr, const boardheader_t *bp, clrtobot(); prints("競標主題: %s\n", fhdr->title); print_bidinfo(0, bidinfo); - money = bidinfo.payby ? " NT$ " : "Ptt$ "; + money = bidinfo.payby ? " NT$ " : MONEYNAME "$ "; if( now > bidinfo.enddate || bidinfo.high == bidinfo.buyitnow ){ outs("此競標已經結束,"); if( bidinfo.userid[0] ) { diff --git a/mbbsd/card.c b/mbbsd/card.c index ab9ce89a..765c9c8e 100644 --- a/mbbsd/card.c +++ b/mbbsd/card.c @@ -390,7 +390,7 @@ card_double_ask(void) char buf[100], buf2[3]; snprintf(buf, sizeof(buf), - "[ %s ]您現在共有 %d P幣, 現在要分組(加收 %d 元)嗎? [y/N]", + "[ %s ]您現在共有 %d 元, 現在要分組(加收 %d 元)嗎? [y/N]", cuser.userid, cuser.money, JACK); reload_money(); if (cuser.money < JACK) @@ -406,7 +406,7 @@ card_ask(void) { char buf[100], buf2[3]; - snprintf(buf, sizeof(buf), "[ %s ]您現在共有 %d P幣, 還要加牌嗎? [y/N]", + snprintf(buf, sizeof(buf), "[ %s ]您現在共有 %d 元, 還要加牌嗎? [y/N]", cuser.userid, cuser.money); getdata(20, 0, buf, buf2, sizeof(buf2), LCECHO); if (buf2[0] == 'y' || buf2[0] == 'Y') @@ -510,7 +510,7 @@ card_jack(int *db) } if (i == 6) { /* 畫面只能擺六張牌, 因此直接算玩家贏. 黑傑克實際上沒這規則 */ game_log(JACK, JACK * 10); - vmsgf("好厲害唷! 六張牌還沒爆! 加P幣 %d 元!", 5 * JACK); + vmsgf("好厲害唷! 六張牌還沒爆! 加 %d 元!", 5 * JACK); return 0; } @@ -522,7 +522,7 @@ card_jack(int *db) if (card_alls_lower(cpu) > 21) { card_show(6, cpu, c, me, m); game_log(JACK, JACK * 2); - vmsgf("呵呵...電腦爆掉了! 你贏了! 可得P幣 %d 元", JACK * 2); + vmsgf("呵呵...電腦爆掉了! 你贏了! 可得 %d 元", JACK * 2); return 0; } j++; @@ -530,12 +530,12 @@ card_jack(int *db) card_show(6, cpu, c, me, m); if(card_alls_upper(cpu)==card_alls_upper(me)) { game_log(JACK, JACK); - vmsgf("平局,退回P幣 %d 元!", JACK); + vmsgf("平局,退回 %d 元!", JACK); return 0; } if(card_alls_upper(cpu)<card_alls_upper(me)) { game_log(JACK, JACK * 2); - vmsgf("呵呵...電腦比較小! 你贏了! 可得P幣 %d 元", JACK * 2); + vmsgf("呵呵...電腦比較小! 你贏了! 可得 %d 元", JACK * 2); return 0; } game_log(JACK, 0); @@ -614,7 +614,7 @@ ten_helf(void) } if (i == 5) { /* 過五關 */ game_log(TEN_HALF, PMONEY * 5); - vmsgf("好厲害唷! 過五關嘍! 加P幣 %d 元!", 5 * PMONEY); + vmsgf("好厲害唷! 過五關嘍! 加 %d 元!", 5 * PMONEY); return 0; } j = 1; @@ -626,7 +626,7 @@ ten_helf(void) if (card_all(cpu) > 21) { card_show(5, cpu, c, me, m); game_log(TEN_HALF, PMONEY * 2); - vmsgf("呵呵...電腦爆掉了! 你贏了! 可得P幣 %d 元", PMONEY * 2); + vmsgf("呵呵...電腦爆掉了! 你贏了! 可得 %d 元", PMONEY * 2); return 0; } j++; diff --git a/mbbsd/dice.c b/mbbsd/dice.c index b44f1744..e809044a 100644 --- a/mbbsd/dice.c +++ b/mbbsd/dice.c @@ -211,7 +211,7 @@ del(int value[100],int total, dicedata_t * table) demoney(money); move(19, 0); clrtoeol(); - prints("你現在有 %u Ptt$歐", cuser.money); + prints("你現在有 %u " MONEYNAME "$歐", cuser.money); table[i].mymoney -= money; show_count(value, index, -money); break; @@ -363,7 +363,7 @@ dice_main(void) while (1) { move(19, 0); - prints(ANSI_COLOR(1;32) "你現在有" ANSI_COLOR(1;31) " %u " ANSI_COLOR(1;32) "Ptt$歐" ANSI_RESET, + prints(ANSI_COLOR(1;32) "你現在有" ANSI_COLOR(1;31) " %u " ANSI_COLOR(1;32) MONEYNAME "$歐" ANSI_RESET, cuser.money); getdata(20, 0, ANSI_COLOR(1;37) "數字:加選 d:退選 s:開始或離開" ANSI_RESET ": ", input, 5, LCECHO); @@ -426,7 +426,7 @@ dice_main(void) } reload_money(); move(19, 0); - prints(ANSI_COLOR(1;32) "你現在有 " ANSI_COLOR(1;31) "%u" ANSI_COLOR(1;32) " Ptt$歐", + prints(ANSI_COLOR(1;32) "你現在有 " ANSI_COLOR(1;31) "%u" ANSI_COLOR(1;32) " " MONEYNAME "$歐", cuser.money); if (sig != 2) show_count(value,index, money); @@ -461,7 +461,7 @@ dice_main(void) if (total > 0) { move(21, 0); - prints(ANSI_COLOR(1;32) "你贏了 " ANSI_COLOR(1;31) "%d" ANSI_COLOR(1;32) " Ptt$ 唷~~" + prints(ANSI_COLOR(1;32) "你贏了 " ANSI_COLOR(1;31) "%d" ANSI_COLOR(1;32) " " MONEYNAME "$ 唷~~" " " ANSI_RESET, total); } else { move(21, 0); @@ -471,7 +471,7 @@ dice_main(void) move(19, 0); clrtoeol(); - prints(ANSI_COLOR(1;32) "你現在有 " ANSI_COLOR(1;31) "%u" ANSI_COLOR(1;32) " Ptt$歐" ANSI_RESET, + prints(ANSI_COLOR(1;32) "你現在有 " ANSI_COLOR(1;31) "%u" ANSI_COLOR(1;32) " " MONEYNAME "$歐" ANSI_RESET, cuser.money); getdata(23, 0, ANSI_COLOR(1;32) "繼續奮鬥[" ANSI_COLOR(1;37) "y/n" ANSI_COLOR(1;32) "]" ANSI_RESET ": ", diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index 6fd3ca68..ec959c2d 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -312,7 +312,7 @@ openticket(int bid) "開獎結果: %s \n\n" "所有金額: %d 元 \n" "中獎比例: %d張/%d張 (%f)\n" - "每張中獎彩票可得 %d 枚P幣 \n\n", + "每張中獎彩票可得 %d " MONEYNAME "幣 \n\n", Cdatelite(&now), betname[bet], total * price, ticket[bet], total, (float)ticket[bet] / total, money); @@ -335,13 +335,13 @@ openticket(int bid) while (fscanf(fp1, "%s %d %d\n", userid, &mybet, &i) != EOF) { if (bet == 98 && mybet >= 0 && mybet < count) { if (fp) - fprintf(fp, "%s 買了 %d 張 %s, 退回 %d 枚P幣\n" + fprintf(fp, "%s 買了 %d 張 %s, 退回 %d 枚" MONEYNAME "幣\n" ,userid, i, betname[mybet], money * i); snprintf(buf, sizeof(buf), "%s 賭場退錢! $ %d", bh->brdname, money * i); } else if (mybet == bet) { if (fp) - fprintf(fp, "恭喜 %s 買了%d 張 %s, 獲得 %d 枚P幣\n" + fprintf(fp, "恭喜 %s 買了%d 張 %s, 獲得 %d 枚" MONEYNAME "幣\n" ,userid, i, betname[mybet], money * i); snprintf(buf, sizeof(buf), "%s 中獎咧! $ %d", bh->brdname, money * i); } else diff --git a/mbbsd/guess.c b/mbbsd/guess.c index 766cbd16..c5408b88 100644 --- a/mbbsd/guess.c +++ b/mbbsd/guess.c @@ -29,7 +29,7 @@ get_money(void) char data[20]; move(1, 0); - prints("您目前有:%d Ptt$", cuser.money); + prints("您目前有:%d " MONEYNAME "$", cuser.money); do { getdata(2, 0, "要賭多少(5-10或按q離開): ", data, 9, LCECHO); money = 0; @@ -53,7 +53,7 @@ get_money(void) move(1, 0); clrtoeol(); reload_money(); - prints("您目前有:%d Ptt$", cuser.money - money); + prints("您目前有:%d " MONEYNAME "$", cuser.money - money); return money; } @@ -235,7 +235,7 @@ guess_main(void) clear(); move(12, 35); unlockutmpmode(); - vmsg("錢不夠啦 至少要 5 Ptt$"); + vmsg("錢不夠啦 至少要 5 " MONEYNAME "$"); return 1; } if ((money = get_money()) == 0) @@ -245,7 +245,7 @@ guess_main(void) Diff_Random(answer); move(2, 0); clrtoeol(); - prints("您下注 :%d Ptt$", money); + prints("您下注 :%d " MONEYNAME "$", money); getdata_str(4, 0, "您要和電腦比賽嗎? <y/n>[y]:", ifcomputer, sizeof(ifcomputer), LCECHO, "y"); @@ -298,7 +298,7 @@ guess_main(void) fprintf(file, "%s 第%d次猜中, ", cuser.userid, count); else fprintf(file, "%s 沒猜中, ", cuser.userid); - fprintf(file, "電腦賺走了%s %d Ptt$\n", cuser.userid, money); + fprintf(file, "電腦賺走了%s %d " MONEYNAME "$\n", cuser.userid, money); fclose(file); } } else if (count < c_count) { @@ -308,7 +308,7 @@ guess_main(void) demoney(money * 2); if ((file = fopen(LOGPASS, "a"))) { fprintf(file, "id: %s, 第%d次猜中, 電腦第%d次猜中, " - "贏了電腦 %d Ptt$\n", cuser.userid, count, + "贏了電腦 %d " MONEYNAME "$\n", cuser.userid, count, c_count, money * 2); fclose(file); } @@ -329,14 +329,14 @@ guess_main(void) if (count < 5) { outs("真厲害, 錢被你賺走了"); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, "id: %s, 第%d次猜中, 贏了 %d Ptt$\n", + fprintf(file, "id: %s, 第%d次猜中, 贏了 %d " MONEYNAME "$\n", cuser.userid, count, TABLE[count] * money); fclose(file); } } else if (count > 5) { outs("唉, 太多次才猜出來了"); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, "id: %s, 第%d次才猜中, 賠了 %d Ptt$\n", + fprintf(file, "id: %s, 第%d次才猜中, 賠了 %d " MONEYNAME "$\n", cuser.userid, count, money); fclose(file); } @@ -344,9 +344,9 @@ guess_main(void) outs("五次猜出來, 還你本錢吧"); move(18, 35); clrtoeol(); - prints("你拿回了%d Ptt$\n", money); + prints("你拿回了%d " MONEYNAME "$\n", money); if ((file = fopen(LOGPASS, "a"))) { - fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %d Ptt$\n", + fprintf(file, "id: %s, 第%d次猜中, 拿回了本錢 %d " MONEYNAME "$\n", cuser.userid, count, money); fclose(file); } @@ -360,7 +360,7 @@ guess_main(void) move(18, 35); outs("下次再來吧"); if ((file = fopen(BBSHOME "/etc/loseguess.log", "a"))) { - fprintf(file, "id: %s 賭了 %d Ptt$\n", cuser.userid, money); + fprintf(file, "id: %s 賭了 %d " MONEYNAME "$\n", cuser.userid, money); fclose(file); } unlockutmpmode(); diff --git a/mbbsd/merge.c b/mbbsd/merge.c index a3c4d20b..913f94f5 100644 --- a/mbbsd/merge.c +++ b/mbbsd/merge.c @@ -87,9 +87,9 @@ m_sob(void) reload_money(); sprintf(buf, - "您的沙灘鸚鵡螺 %10d 換算成 Ptt 幣為 %9d (匯率 22:1), \n" - " 沙灘貝殼有 %10d 換算為 Ptt 幣為 %9d (匯率 222105:1), \n" - " 原有P幣 %10d 匯入後共有 %d\n", + "您的沙灘鸚鵡螺 %10d 換算成 " MONEYNAME " 幣為 %9d (匯率 22:1), \n" + " 沙灘貝殼有 %10d 換算為 " MONEYNAME " 幣為 %9d (匯率 222105:1), \n" + " 原有 %10d 匯入後共有 %d\n", (int)man.goldmoney, (int)man.goldmoney/22, (int)man.silvermoney, (int)man.silvermoney/222105, cuser.money, diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 720b38da..c3ce1494 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -2843,7 +2843,7 @@ userlist(void) redrawall = redraw = 1; break; } - if (getans("確定要給 %s %d Ptt 幣嗎? [N/y]", + if (getans("確定要給 %s %d " MONEYNAME " 幣嗎? [N/y]", userid, ch) != 'y'){ redrawall = redraw = 1; break; |