Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 4444e7ff authored by rswindell's avatar rswindell

Support for a 3rd line of RESULT.ED drop file (from external message editors):

Full editor name and version details (up to 127 chars), for use in the EDITOR
msg header field which is propagated over QWK networks.
From what I could find, the WWIV RESULT.ED file format only ever contained 2
lines:
<Anonymous: 0/1>
<subject>

So adding support for an optional 3rd line should be fine and backwards
compatible. Hopefully WWIV or its message editors don't define a different
"standard" 3rd line in the future. :-)
parent 18b196e4
......@@ -672,6 +672,7 @@ public:
int process_edited_text(char* buf, FILE* stream, long mode, unsigned* lines, unsigned maxlines);
int process_edited_file(const char* src, const char* dest, long mode, unsigned* lines, unsigned maxlines);
void editor_info_to_msg(smbmsg_t*, const char* editor, const char* charset);
char editor_details[128];
/* postmsg.cpp */
bool postmsg(uint subnum, long wm_mode = WM_NONE, smb_t* resmb = NULL, smbmsg_t* remsg = NULL);
......
......@@ -579,10 +579,20 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, long mode,
&& !(cfg.xedit[useron_xedit-1]->misc&QUICKBBS)
&& fexistcase(str)) {
if((fp=fopen(str,"r")) != NULL) {
fgets(str,sizeof(str),fp);
fgets(str,sizeof(str),fp);
truncsp(str);
safe_snprintf(subj,LEN_TITLE,"%s",str);
if (fgets(str, sizeof(str), fp) != NULL) {
str[0] = 0;
if (fgets(str, sizeof(str), fp) != NULL) {
truncsp(str);
if(str[0])
safe_snprintf(subj, LEN_TITLE, "%s", str);
editor_details[0] = 0;
if (fgets(editor_details, sizeof(editor_details), fp) != NULL) {
truncsp(editor_details);
if (editor_details[0] && editor != NULL)
*editor = editor_details;
}
}
}
fclose(fp);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment