summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/admin.c44
-rw-r--r--mbbsd/bbs.c30
-rw-r--r--mbbsd/chat.c2
-rw-r--r--mbbsd/guess.c3
-rw-r--r--mbbsd/lovepaper.c3
-rw-r--r--mbbsd/mail.c16
-rw-r--r--mbbsd/vote.c3
-rw-r--r--mbbsd/voteboard.c9
8 files changed, 38 insertions, 72 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index b62a1d89..cad9cad5 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -336,8 +336,7 @@ m_mod_board(char *bname)
bid = getbnum(bname);
if (!bid || !bname[0] || get_record(fn_board, &bh, sizeof(bh), bid) == -1) {
- outs(err_bid);
- pressanykey();
+ vmsg(err_bid);
return -1;
}
prints("看板名稱:%s\n看板說明:%s\n看板bid:%d\n看板GID:%d\n"
@@ -660,20 +659,19 @@ x_file()
getdata(b_lines - 1, 0, "第幾個進站畫面[1-4]", ans, sizeof(ans), LCECHO);
if (ans[0] == '1') {
unlink("etc/Welcome_login.1");
- outs("ok");
+ vmsg("ok");
} else if (ans[0] == '2') {
unlink("etc/Welcome_login.2");
- outs("ok");
+ vmsg("ok");
} else if (ans[0] == '3') {
unlink("etc/Welcome_login.3");
- outs("ok");
+ vmsg("ok");
} else if (ans[0] == '4') {
unlink("etc/Welcome_login.4");
- outs("ok");
+ vmsg("ok");
} else {
- outs("所指定的進站畫面無法刪除");
+ vmsg("所指定的進站畫面無法刪除");
}
- pressanykey();
return FULLUPDATE;
#endif
@@ -710,9 +708,8 @@ x_file()
return FULLUPDATE;
}
aborted = vedit(fpath, NA, NULL);
- prints("\n\n系統檔案[%s]:%s", fpath,
- (aborted == -1) ? "未改變" : "更新完畢");
- pressanykey();
+ vmsg("\n\n系統檔案[%s]:%s", fpath,
+ (aborted == -1) ? "未改變" : "更新完畢");
return FULLUPDATE;
}
@@ -743,9 +740,7 @@ m_newbrd(int recover)
newboard.gid = class_bid;
if (newboard.gid == 0) {
- move(6, 0);
- outs("請先選擇一個類別再開板!");
- pressanykey();
+ vmsg("請先選擇一個類別再開板!");
return -1;
}
do {
@@ -771,13 +766,11 @@ m_newbrd(int recover)
if (recover) {
if (dashd(genbuf)) {
- outs("此看板已經存在! 請取不同英文板名");
- pressanykey();
+ vmsg("此看板已經存在! 請取不同英文板名");
return -1;
}
} else if (getbnum(newboard.brdname) > 0 || mkdir(genbuf, 0755) == -1) {
- outs("此看板已經存在! 請取不同英文板名");
- pressanykey();
+ vmsg("此看板已經存在! 請取不同英文板名");
return -1;
}
newboard.brdattr = BRD_NOTRAN;
@@ -1017,15 +1010,13 @@ scan_register_form(char *regfile, int automode, int neednum)
move(2, 0);
if (dashf(fname)) {
if (neednum == 0) { /* 自己進 Admin 來審的 */
- outs("其他 SYSOP 也在審核註冊申請單");
- pressanykey();
+ vmsg("其他 SYSOP 也在審核註冊申請單");
}
return -1;
}
Rename(regfile, fname);
if ((fn = fopen(fname, "r")) == NULL) {
- prints("系統錯誤,無法讀取註冊資料檔: %s", fname);
- pressanykey();
+ vmsg("系統錯誤,無法讀取註冊資料檔: %s", fname);
return -1;
}
if (neednum) { /* 被強迫審的 */
@@ -1101,8 +1092,7 @@ scan_register_form(char *regfile, int automode, int neednum)
if (neednum > 0 && ans[0] == 'q') {
move(2, 0);
clrtobot();
- outs("沒審完不能退出");
- pressanykey();
+ vmsg("沒審完不能退出");
ans[0] = 's';
}
switch (ans[0]) {
@@ -1323,8 +1313,7 @@ give_money()
money = atoi(buf);
if (money <= 0) {
move(2, 0);
- outs("輸入錯誤!!");
- pressanykey();
+ vmsg("輸入錯誤!!");
return 1;
}
} else {
@@ -1346,8 +1335,7 @@ give_money()
getdata(1, 0, "紅包袋標題 :", tt, TTLEN, DOECHO);
move(2, 0);
- outs("編紅包袋內容");
- pressanykey();
+ vmsg("編紅包袋內容");
if (vedit("etc/givemoney.why", NA, NULL) < 0) {
fclose(fp2);
return 1;
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index da94fda7..55c859bb 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -954,8 +954,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct)
if (!CheckPostPerm()) {
move(5, 10);
- outs("對不起,您目前無法轉錄文章!");
- pressanykey();
+ vmsg("對不起,您目前無法轉錄文章!");
return FULLUPDATE;
}
move(2, 0);
@@ -1045,8 +1044,7 @@ cross_post(int ent, fileheader_t * fhdr, char *direct)
setbtotal(getbnum(xboard));
cuser.numposts++;
UPDATE_USEREC;
- outs("文章轉錄完成");
- pressanykey();
+ vmsg("文章轉錄完成");
currmode = currmode0;
}
return FULLUPDATE;
@@ -1410,7 +1408,8 @@ do_bid(int ent, fileheader_t * fhdr, boardheader_t *bp,
}
#endif
}
- else outs("無人得標!");
+ else
+ outs("無人得標!");
pressanykey();
return FULLUPDATE;
}
@@ -1426,8 +1425,7 @@ do_bid(int ent, fileheader_t * fhdr, boardheader_t *bp,
next=bidinfo.high;
}
if( !strcmp(cuser.userid,bidinfo.userid) ){
- outs("你是最高得標者!");
- pressanykey();
+ vmsg("你是最高得標者!");
return FULLUPDATE;
}
if( strcmp(cuser.userid, fhdr->owner) == 0 ){
@@ -1815,15 +1813,12 @@ tar_addqueue(int ent, fileheader_t * fhdr, char *direct)
showtitle("看板備份", BBSNAME);
move(2, 0);
if (!((currmode & MODE_BOARD) || HAS_PERM(PERM_SYSOP))) {
- move(5, 10);
- outs("妳要是板主或是站長才能醬醬啊 -.-\"\"");
- pressanykey();
+ vmsg("妳要是板主或是站長才能醬醬啊 -.-\"\"");
return FULLUPDATE;
}
snprintf(qfn, sizeof(qfn), BBSHOME "/jobspool/tarqueue.%s", currboard);
if (access(qfn, 0) == 0) {
- outs("已經排定行程, 稍後會進行備份");
- pressanykey();
+ vmsg("已經排定行程, 稍後會進行備份");
return FULLUPDATE;
}
if (!getdata(4, 0, "請輸入目的信箱:", email, sizeof(email), DOECHO))
@@ -1831,9 +1826,7 @@ tar_addqueue(int ent, fileheader_t * fhdr, char *direct)
/* check email -.-"" */
if (strstr(email, "@") == NULL || strstr(email, ".bbs@") != NULL) {
- move(6, 0);
- outs("您指定的信箱不正確! ");
- pressanykey();
+ vmsg("您指定的信箱不正確! ");
return FULLUPDATE;
}
getdata(6, 0, "要備份看板內容嗎(Y/N)?[Y]", ans, sizeof(ans), LCECHO);
@@ -1841,9 +1834,7 @@ tar_addqueue(int ent, fileheader_t * fhdr, char *direct)
getdata(7, 0, "要備份精華區內容嗎(Y/N)?[N]", ans, sizeof(ans), LCECHO);
bakman = (ans[0] == 'y' || ans[0] == 'Y') ? 1 : 0;
if (!bakboard && !bakman) {
- move(8, 0);
- outs("可是我們只能備份看板或精華區的耶 ^^\"\"\"");
- pressanykey();
+ vmsg("可是我們只能備份看板或精華區的耶 ^^\"\"\"");
return FULLUPDATE;
}
fp = fopen(qfn, "w");
@@ -1957,8 +1948,7 @@ b_note_edit_bname(int bid)
aborted = vedit(buf, NA, NULL);
if (aborted == -1) {
clear();
- outs(msg_cancel);
- pressanykey();
+ vmsg(msg_cancel);
} else {
if (!getdata(2, 0, "設定有效期限天?(n/Y)", buf, 3, LCECHO)
|| buf[0] != 'n')
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index 0d7192e9..b911b47c 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -322,7 +322,7 @@ t_chat()
cfd = socket(sin.sin_family, SOCK_STREAM, 0);
if (connect(cfd, (struct sockaddr *) & sin, sizeof sin) != 0) {
outs("\n "
- "哇! 沒人在那邊耶...要有那地方的人先去開門啦!...");
+ "哇! 沒人在那邊耶...要有那地方的人先去開門啦!...");
system("bin/xchatd");
pressanykey();
close(cfd);
diff --git a/mbbsd/guess.c b/mbbsd/guess.c
index 77914147..55e5e624 100644
--- a/mbbsd/guess.c
+++ b/mbbsd/guess.c
@@ -234,9 +234,8 @@ guess_main(void)
if (cuser.money < 5) {
clear();
move(12, 35);
- outs("錢不夠啦 至少要 5 Ptt$");
unlockutmpmode();
- pressanykey();
+ vmsg("錢不夠啦 至少要 5 Ptt$");
return 1;
}
if ((money = get_money()) == 0)
diff --git a/mbbsd/lovepaper.c b/mbbsd/lovepaper.c
index e8a15769..4a2a1a18 100644
--- a/mbbsd/lovepaper.c
+++ b/mbbsd/lovepaper.c
@@ -29,8 +29,7 @@ x_love()
getdata(8, 0, "主 題:", save_title,
sizeof(save_title), DOECHO))) {
move(10, 0);
- outs("收信人或主題不正確, 情書無法傳遞. ");
- pressanykey();
+ vmsg("收信人或主題不正確,情書無法傳遞");
return 0;
}
fpo = fopen(path, "w");
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 506d8c38..767bf5e2 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -124,9 +124,7 @@ m_internet()
getdata(21, 0, "主 題:", save_title, STRLEN, DOECHO))
do_send(receiver, save_title);
else {
- move(22, 0);
- outs("收信人或主題不正確, 請重新選取指令");
- pressanykey();
+ vmsg("收信人或主題不正確,請重新選取指令");
}
return 0;
}
@@ -761,8 +759,7 @@ m_new()
curredit |= EDIT_MAIL;
curredit &= ~EDIT_ITEM;
if (apply_record(currmaildir, read_new_mail, sizeof(fileheader_t)) == -1) {
- outs("沒有新信件了");
- pressanykey();
+ vmsg("沒有新信件了");
return -1;
}
curredit = 0;
@@ -771,8 +768,7 @@ m_new()
while (delcnt--)
delete_record(currmaildir, sizeof(fileheader_t), delmsgs[delcnt]);
}
- outs(mrd ? "信已閱\畢" : "沒有新信件了");
- pressanykey();
+ vmsg(mrd ? "信已閱\畢" : "沒有新信件了");
return -1;
}
@@ -932,8 +928,7 @@ mail_reply(int ent, fileheader_t * fhdr, char *direct)
if (!strcmp(t, str_author1) || !strcmp(t, str_author2))
strlcpy(uid, strtok(NULL, str_space), sizeof(uid));
else {
- outs("錯誤: 找不到作者。");
- pressanykey();
+ vmsg("錯誤: 找不到作者。");
return FULLUPDATE;
}
} else
@@ -1113,8 +1108,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct)
if (!xfile.filemode)
outgo_post(&xfile, xboard, cuser.userid, cuser.username);
cuser.numposts++;
- outmsg("文章轉錄完成");
- pressanykey();
+ vmsg("文章轉錄完成");
currmode = currmode0;
}
return FULLUPDATE;
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index a006cd3b..e61050a7 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -713,8 +713,7 @@ vote_maintain(char *bname)
fputs(inbuf, fp);
fclose(fp);
- outs("按任何鍵開始編輯此次 [投票宗旨]");
- pressanykey();
+ vmsg("按任何鍵開始編輯此次 [投票宗旨]");
setbfile(buf, bname, STR_new_desc);
aborted = vedit(buf, NA, NULL);
if (aborted == -1) {
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c
index 84a50032..ccbe1ef4 100644
--- a/mbbsd/voteboard.c
+++ b/mbbsd/voteboard.c
@@ -22,8 +22,7 @@ do_voteboardreply(fileheader_t * fhdr)
clear();
if (!CheckPostPerm()) {
move(5, 10);
- outs("對不起,您目前無法在此發表文章!");
- pressanykey();
+ vmsg("對不起,您目前無法在此發表文章!");
return;
}
setbpath(fpath, currboard);
@@ -53,8 +52,7 @@ do_voteboardreply(fileheader_t * fhdr)
assert(ptr);
sscanf(ptr + 1, "%ld", &endtime);
if (endtime < now) {
- outs("連署時間已過");
- pressanykey();
+ vmsg("連署時間已過");
fclose(fi);
return;
}
@@ -159,8 +157,7 @@ do_voteboard(int type)
clear();
if (!CheckPostPerm()) {
move(5, 10);
- outs("對不起,您目前無法在此發表文章!");
- pressanykey();
+ vmsg("對不起,您目前無法在此發表文章!");
return FULLUPDATE;
}
move(0, 0);