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

Save/reuse path where messages are saved (per sub-board) to data/user/*.ini

This is a sysop time saver when saving multiple posts to a local text file
(using the Operator->Save message text command).

This is pretty much a copy/paste from readmail.cpp, but uses a different .ini
section name.
parent 8bb9de45
No related branches found
No related tags found
No related merge requests found
Pipeline #8585 passed
......@@ -414,6 +414,7 @@ int sbbs_t::scanposts(int subnum, int mode, const char *find)
, done = 0, domsg = 1, *buf;
char find_buf[128];
char tmp[128];
char savepath[MAX_PATH + 1]{};
int i;
int64_t i64;
int quit = 0;
......@@ -1287,13 +1288,17 @@ int sbbs_t::scanposts(int subnum, int mode, const char *find)
case 'Q':
break;
case 'S': /* Save/Append message to another file */
/* 05/26/95
if(!yesno(text[SaveMsgToFile]))
break;
*/
bputs(text[FileToWriteTo]);
if (getstr(str, 50, K_LINE))
msgtotxt(&smb, &msg, str, /* header: */ true, /* mode: */ GETMSGTXT_ALL);
{
char section[128];
const char* key = "savepath";
SAFEPRINTF(section, "%s.sub", cfg.sub[subnum]->code);
user_get_property(&cfg, useron.number, section, key, savepath, sizeof(savepath) - 1);
if (getstr(savepath, sizeof(savepath) - 1, K_EDIT | K_LINE | K_AUTODEL) > 0) {
if (msgtotxt(&smb, &msg, savepath, /* header: */ true, /* mode: */ GETMSGTXT_ALL))
user_set_property(&cfg, useron.number, section, key, savepath);
}
}
break;
case 'T': /* Twit-list the sender */
domsg = false;
......
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