summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-15 09:52:29 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-15 09:52:29 +0800
commit3e81a09d779f1681374df9eba0ad035c65067e51 (patch)
tree064d3533ea56c3b4a06cb6e792f0991f3795069f /mbbsd
parent29da9557a86842cee2ce3958cecb2b5c8721f18b (diff)
downloadpttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar.gz
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar.bz2
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar.lz
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar.xz
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.tar.zst
pttbbs-3e81a09d779f1681374df9eba0ad035c65067e51.zip
add support to "mark mail as replied"
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3169 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mail.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 1f60177a..30e9b06c 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -925,9 +925,25 @@ mailtitle(void)
static void
maildoent(int num, fileheader_t * ent)
{
- char *title, *mark, *color = NULL, type = "+ Mm"[(ent->filemode & 3)];
+ char *title, *mark, *color = NULL, type = ' ';
char datepart[6];
+ if (ent->filemode & FILE_MARKED)
+ {
+ type = (ent->filemode & FILE_READ) ?
+ 'm' : 'M';
+ }
+ else if (ent->filemode & FILE_REPLIED)
+ {
+ type = (ent->filemode & FILE_READ) ?
+ 'r' : 'R';
+ }
+ else
+ {
+ type = (ent->filemode & FILE_READ) ?
+ ' ' : '+';
+ }
+
if (TagNum && !Tagger(atoi(ent->filename + 2), 0, TAG_NIN))
type = 'D';
@@ -1083,7 +1099,7 @@ mail_read(int ent, fileheader_t * fhdr, const char *direct)
/* in boards/mail 回信給原作者,轉信站亦可 */
int
-mail_reply(int ent, const fileheader_t * fhdr, const char *direct)
+mail_reply(int ent, fileheader_t * fhdr, const char *direct)
{
char uid[STRLEN];
char *t;
@@ -1132,6 +1148,16 @@ mail_reply(int ent, const fileheader_t * fhdr, const char *direct)
case -3:
prints("使用者 [%s] 無法收信", uid);
break;
+
+ case 0:
+ /* success */
+ if ( (curredit & EDIT_MAIL) &&
+ !(fhdr->filemode & FILE_REPLIED))
+ {
+ fhdr->filemode |= FILE_REPLIED;
+ substitute_ref_record(direct, fhdr, ent);
+ }
+ break;
}
curredit = ent;
pressanykey();