summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 01:38:19 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-05 01:38:19 +0800
commit890dd47e135c29397a6006556e186061f2afcc67 (patch)
treeb44f0675f1e4ed00dbf3abf544164a3c04154216 /mbbsd
parent5389a0dd087aaed29cc6e11f5623aef4bb9accf4 (diff)
downloadpttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar.gz
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar.bz2
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar.lz
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar.xz
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.tar.zst
pttbbs-890dd47e135c29397a6006556e186061f2afcc67.zip
- move hard-coded board names to pttbbs.conf.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3629 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c23
-rw-r--r--mbbsd/cache.c2
-rw-r--r--mbbsd/gamble.c2
-rw-r--r--mbbsd/mail.c2
-rw-r--r--mbbsd/mbbsd.c6
-rw-r--r--mbbsd/talk.c4
-rw-r--r--mbbsd/user.c2
7 files changed, 26 insertions, 15 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 934cf3e9..2cd2bb91 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -825,7 +825,8 @@ do_general(int isbid)
if( !CheckPostPerm()
#ifdef FOREIGN_REG
// 不是外籍使用者在 PttForeign 板
- && !((cuser.uflag2 & FOREIGN) && strcmp(bp->brdname, "PttForeign") == 0)
+ && !((cuser.uflag2 & FOREIGN) &&
+ strcmp(bp->brdname, GLOBAL_FOREIGN) == 0)
#endif
) {
vmsg("對不起,您目前無法在此發表文章!");
@@ -3241,8 +3242,14 @@ good_post(int ent, fileheader_t * fhdr, const char *direct)
if (fhdr->filemode & FILE_DIGEST) {
fhdr->filemode = (fhdr->filemode & ~FILE_DIGEST);
- if (!strcmp(currboard, "Note") || !strcmp(currboard, "PttBug") ||
- !strcmp(currboard, "Artdsn") || !strcmp(currboard, "PttLaw")) {
+ if (!strcmp(currboard, GLOBAL_NOTE) ||
+ // 2007/12/05: what is 'Artdsn' here?
+ // disable it unless someone need it...
+ // !strcmp(currboard, "Artdsn") ||
+ !strcmp(currboard, GLOBAL_BUGREPORT) ||
+ !strcmp(currboard, GLOBAL_LAW)
+ )
+ {
deumoney(searchuser(fhdr->owner, NULL), -1000); // TODO if searchuser() return 0
if (!(currmode & MODE_SELECT))
fhdr->multi.money -= 1000;
@@ -3281,8 +3288,14 @@ good_post(int ent, fileheader_t * fhdr, const char *direct)
#endif
fhdr->filemode = (fhdr->filemode & ~FILE_MARKED) | FILE_DIGEST;
- if (!strcmp(currboard, "Note") || !strcmp(currboard, "PttBug") ||
- !strcmp(currboard, "Artdsn") || !strcmp(currboard, "PttLaw")) {
+ if (!strcmp(currboard, GLOBAL_NOTE) ||
+ // 2007/12/05: what is 'Artdsn' here?
+ // disable it unless someone need it...
+ // !strcmp(currboard, "Artdsn") ||
+ !strcmp(currboard, GLOBAL_BUGREPORT) ||
+ !strcmp(currboard, GLOBAL_LAW)
+ )
+ {
deumoney(searchuser(fhdr->owner, NULL), 1000); // TODO if searchuser() return 0
if (!(currmode & MODE_SELECT))
fhdr->multi.money += 1000;
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index f38263e8..881748cd 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -855,7 +855,7 @@ reload_pttcache(void)
SHM->Pbusystate = 1;
SHM->last_film = 0;
bzero(SHM->notes, sizeof(SHM->notes));
- setapath(pbuf, "Note");
+ setapath(pbuf, GLOBAL_NOTE);
setadir(buf, pbuf);
id = 0;
if ((fp = fopen(buf, "r"))) {
diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c
index 3229b906..9896333d 100644
--- a/mbbsd/gamble.c
+++ b/mbbsd/gamble.c
@@ -249,7 +249,7 @@ openticket(int bid)
if(rename(buf, outcome) != 0)
{
unlockutmpmode();
- vmsg("無法準備開獎... 請至 PttBug 報告並附上板名。");
+ vmsg("無法準備開獎... 請至 " GLOBAL_BUGREPORT " 報告並附上板名。");
return 0;
}
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 74efde1f..0196aa88 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -155,7 +155,7 @@ invalidaddr(const char *addr)
"但檢查不出原因,所以我們需要正確的錯誤回報。\n\n"
"如果你確實打錯了,請直接略過下面的說明。\n"
"如果你認為你輸入的位址確實是對的,請把下面的訊息複製起來\n"
- "並貼到 SYSOP 或 PttBug 板。本站為造成不便深感抱歉。\n\n"
+ "並貼到 " GLOBAL_BUGREPORT " 板。本站為造成不便深感抱歉。\n\n"
ANSI_COLOR(1;33));
sprintf(errmsg, "原始輸入位址: [%s]\n"
"錯誤位置: 第 %d 字元: 0x%02X [ %c ]\n",
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 3e1fbef0..87b98b0f 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -257,16 +257,14 @@ abort_bbs_debug(int sig)
sigaddset(&sigset, SIGXCPU);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
- // TODO change the PttBug to some other names for non-PTT sites?
-
#define CRASH_MSG ANSI_COLOR(0) \
"\r\n程式異常, 立刻斷線. \r\n" \
- "請洽 PttBug 板詳述問題發生經過。\r\n"
+ "請洽 " GLOBAL_BUGREPORT " 板詳述問題發生經過。\r\n"
#define XCPU_MSG ANSI_COLOR(0) \
"\r\n程式耗用過多計算資源, 立刻斷線。\r\n" \
"可能是 (a)執行太多耗用資源的動作 或 (b)程式掉入無窮迴圈. "\
- "請洽 PttBug 板詳述問題發生經過。\r\n"
+ "請洽 " GLOBAL_BUGREPORT " 板詳述問題發生經過。\r\n"
if(sig==SIGXCPU)
write(1, XCPU_MSG, sizeof(XCPU_MSG));
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 31694b34..32d22a96 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -3407,7 +3407,7 @@ GotoNewHand(){
if (currboard[0])
strlcpy(old_board, currboard, IDLEN + 1);
- if (enter_board("PttNewHand")==0) {
+ if (enter_board(GLOBAL_NEWBIE)==0) {
Read();
}
@@ -3470,7 +3470,7 @@ AngelNotOnline(){
"──────────────┴☉" ANSI_RESET "\n");
move(b_lines - 4, 0);
- outs("小主人使用上問題找不到小天使請到新手版(PttNewhand)\n"
+ outs("小主人使用上問題找不到小天使請到新手版(" GLOBAL_NEWBIE ")\n"
" 想留言給小天使請到許\願版(AngelPray)\n"
" 想找看板在哪的話可到(AskBoard)\n"
"請先在各板上尋找答案或按 Ctrl-P 發問");
diff --git a/mbbsd/user.c b/mbbsd/user.c
index c8a7943b..f89d1d82 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -241,7 +241,7 @@ mail_violatelaw(const char *crime, const char *police, const char *reason, const
"時間: %s\n"
ANSI_COLOR(1;32) "%s" ANSI_RESET "判決:\n " ANSI_COLOR(1;32) "%s" ANSI_RESET
"因" ANSI_COLOR(1;35) "%s" ANSI_RESET "行為,\n違反本站站規,處以" ANSI_COLOR(1;35) "%s" ANSI_RESET ",特此通知"
- "\n請到 PttLaw 查詢相關法規資訊,並到 Play-Pay-ViolateLaw 繳交罰單",
+ "\n請到 " GLOBAL_LAW " 查詢相關法規資訊,並到 Play-Pay-ViolateLaw 繳交罰單",
ctime4(&now), police, crime, reason, result);
fclose(fp);
strcpy(fhdr.title, "[報告] 違法判決報告");