Skip to content
Snippets Groups Projects
Commit 208cc78b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't save draft messages upon disconnect for Guest or "no one" (user #0)

Fix issue #508
parent e7c25a05
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3741 passed
......@@ -604,7 +604,7 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, long mode,
rioctl(IOSM|PAUSE|ABORT);
checkline();
if(!online && flength(msgtmp) > 0) { // save draft message due to disconnection
if(!online && (flength(msgtmp) > 0) && (useron.number > 0) && !(useron.rest & FLAG('G'))) { // save draft message due to disconnection
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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment