Skip to content
Snippets Groups Projects
Commit 33bae8b6 authored by rswindell's avatar rswindell
Browse files

Store the draft message creation time stamp (just informational for now) and

log a message when a draft message is saved.
parent 7795f415
No related branches found
No related tags found
No related merge requests found
......@@ -517,8 +517,11 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, long mode,
checkline();
if(!online) { // save draft due to disconnection
mv(msgtmp, draft, /* copy: */true);
user_set_property(&cfg, useron.number, draft_desc, "subject", subj);
if(mv(msgtmp, draft, /* copy: */true) == 0) {
user_set_property(&cfg, useron.number, draft_desc, "subject", subj);
user_set_time_property(&cfg, useron.number, draft_desc, "created", time(NULL));
lprintf(LOG_NOTICE, "Draft message saved: %s", draft);
}
}
if(result != EXIT_SUCCESS || !fexistcase(msgtmp) || !online
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment