summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 15:37:31 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-20 15:37:31 +0800
commit9a360cadca87f1c091ecd1502237051be58d1cb7 (patch)
tree1e9c1af6fc7ac8831172ae958db9d5ee4c2a0080 /mbbsd
parentb384cc82423ed1e451b2109d2bd3ad22dd8e15cb (diff)
downloadpttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar.gz
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar.bz2
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar.lz
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar.xz
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.tar.zst
pttbbs-9a360cadca87f1c091ecd1502237051be58d1cb7.zip
- chat: add ZA in chat
- mail/read: allow ^P in mail to send iner mail - syspost: fix some messages without trailing newlines git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4216 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/chat.c25
-rw-r--r--mbbsd/mail.c16
-rw-r--r--mbbsd/read.c2
-rw-r--r--mbbsd/syspost.c2
4 files changed, 35 insertions, 10 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index 915ff749..0753d8c2 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -299,6 +299,20 @@ _vgetcb_peek(int key, char *buf, int *picurr, int *piend, int len, void *ptr)
add_io(p->cfd, 0);
}
return VGETCB_NEXT;
+
+ // Support ZA because chat is mostly independent and secure.
+ case Ctrl('Z'):
+ {
+ int za = 0;
+ VREFCUR cur = vcur_save();
+ za = ZA_Select();
+ move(b_lines, 0);
+ clrtoeol();
+ vcur_restore(cur);
+ if (za)
+ return VGETCB_ABORT;
+ return VGETCB_NEXT;
+ }
}
return VGETCB_NONE;
}
@@ -400,8 +414,8 @@ t_chat(void)
move(STOP_LINE, 0);
outs(msg_seperator);
- move(STOP_LINE, 56);
- outs(" /h 查詢指令 /b 離開 ");
+ move(STOP_LINE, 40);
+ outs(" /h 查詢指令 /b 離開 (Ctrl-Z)快速切換 ");
move(1, 0);
outs(msg_seperator);
print_chatid(chatid);
@@ -420,6 +434,13 @@ t_chat(void)
vgetparam.chatting = &chatting;
while (chatting) {
+ if (ZA_Waiting())
+ {
+ // process ZA
+ VREFSCR scr = vscr_save();
+ ZA_Enter();
+ vscr_restore(scr);
+ }
print_chatid(chatid); clrtobot();
move(b_lines-1, chatid_len);
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 9b051613..1fb65f35 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -85,7 +85,7 @@ built_mail_index(void)
"確定重建信箱?(y/N)", genbuf, 3,
LCECHO);
if (genbuf[0] != 'y')
- return 0;
+ return FULLUPDATE;
snprintf(genbuf, sizeof(genbuf),
BBSHOME "/bin/buildir " BBSHOME "/home/%c/%s > /dev/null",
@@ -93,7 +93,7 @@ built_mail_index(void)
mvouts(b_lines - 1, 0, ANSI_COLOR(1;31) "已經處理完畢!! 諸多不便 敬請原諒~" ANSI_RESET);
system(genbuf);
pressanykey();
- return 0;
+ return FULLUPDATE;
}
int
@@ -475,14 +475,18 @@ my_send(const char *uident)
int
m_send(void)
{
- char uident[40];
+ // in-site mail
+ char uident[IDLEN+1];
- vs_hdr("且聽風的話");
+ vs_hdr("站內寄信");
usercomplete(msg_uid, uident);
showplans(uident);
if (uident[0])
+ {
my_send(uident);
- return 0;
+ return FULLUPDATE;
+ }
+ return DIRCHANGED;
}
/* 群組寄信、回信 : multi_send, multi_reply */
@@ -1690,7 +1694,7 @@ static const onekey_t mail_comms[] = {
{ 0, NULL }, // Ctrl('M')
{ 0, NULL }, // Ctrl('N')
{ 0, NULL }, // Ctrl('O') // DO NOT USE THIS KEY - UNIX not sending
- { 0, NULL }, // Ctrl('P')
+ { 0, m_send }, // Ctrl('P')
{ 0, NULL }, // Ctrl('Q')
{ 0, NULL }, // Ctrl('R')
{ 0, NULL }, // Ctrl('S')
diff --git a/mbbsd/read.c b/mbbsd/read.c
index a16d32dd..25722c39 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -1303,7 +1303,7 @@ i_read(int cmdmode, const char *direct, void (*dotitle) (),
case READ_REDRAW:
if (curredit & EDIT_MAIL)
vs_footer(" 鴻雁往返 ",
- " (R)回信 (x)站內轉寄 (y)回群組信 (d/D)刪信 (m)保留標記\t(←/q)離開");
+ " (R)回信 (x)站內轉寄 (y)回群組信 (d/D)刪信 (^P)寄發新信 \t(←/q)離開");
else
vs_footer(" 文章選讀 ",
" (y)回應(X)推文(x)轉錄 (=[]<>)相關主題(/?a)搜尋標題/作者 (b)進板畫面");
diff --git a/mbbsd/syspost.c b/mbbsd/syspost.c
index a1bbffa9..02b614d4 100644
--- a/mbbsd/syspost.c
+++ b/mbbsd/syspost.c
@@ -91,7 +91,7 @@ post_change_perm(int oldperm, int newperm, const char *sysopid, const char *user
clear();
while (!getdata(5, 0, "請輸入理由以示負責:",
reason, sizeof(reason), DOECHO));
- sprintf(s, "\n " ANSI_COLOR(1;37) "站長%s修改權限理由是:%s" ANSI_RESET,
+ sprintf(s, "\n " ANSI_COLOR(1;37) "站長%s修改權限理由是:%s\n" ANSI_RESET,
cuser.userid, reason);
snprintf(title, sizeof(title), "[公安報告] 站長%s修改%s權限報告",