summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
commita94b472a72351631253be327d73738cc4d0dd00d (patch)
tree51aa0170f6ba89561451469efb067290191920e3 /mbbsd/mail.c
parent1d8009f548a41b171b7c9ef562ce043f7103b671 (diff)
downloadpttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.gz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.bz2
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.lz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.xz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.zst
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.zip
General Update by PttSuggest:
- 'w' in mail can msg - author in mail header will highlight if online - recommendation message fix - ignore empty input for login - better prompt for empty fav git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3599 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 49d66859..a34eea30 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -954,6 +954,7 @@ maildoent(int num, fileheader_t * ent)
{
char *title, *mark, *color = NULL, type = ' ';
char datepart[6];
+ char isonline = 0;
if (ent->filemode & FILE_MARKED)
{
@@ -985,6 +986,8 @@ maildoent(int num, fileheader_t * ent)
strlcpy(datepart, ent->date, sizeof(datepart));
+ isonline = query_online(ent->owner);
+
switch(showmail_mode)
{
case SHOWMAIL_SUM:
@@ -1027,8 +1030,12 @@ maildoent(int num, fileheader_t * ent)
color = "";
}
- prints("%6d %c %-6s%-15.14s%s %s%-*.*s%s\n",
- num, type, datepart, ent->owner, mark, color,
+ prints("%6d %c %-6s%s%-15.14s%s%s %s%-*.*s%s\n",
+ num, type, datepart,
+ isonline ? ANSI_COLOR(1) : "",
+ ent->owner,
+ isonline ? ANSI_RESET : "",
+ mark, color,
t_columns - 34, t_columns - 34,
title,
*color ? ANSI_RESET : "");
@@ -1060,6 +1067,8 @@ mail_del(int ent, const fileheader_t * fhdr, const char *direct)
return READ_REDRAW;
}
+int b_call_in(int ent, const fileheader_t * fhdr, const char *direct);
+
static int
mail_read(int ent, fileheader_t * fhdr, const char *direct)
{
@@ -1632,7 +1641,7 @@ static const onekey_t mail_comms[] = {
{ 0, NULL }, // 'u'
#endif
{ 0, NULL }, // 'v'
- { 0, NULL }, // 'w'
+ { 1, b_call_in }, // 'w'
{ 1, m_forward }, // 'x'
{ 1, multi_reply }, // 'y'
{ 0, mail_man }, // 'z' 122