Commit 4a824f52 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Display message comment headers without relying on smb_getmsgtxt()

Since we're calling smb_getplaintext() manually here, and its not going to return the comment headers as part of the plain-text (the way smb_getmsgtxt() can), so we need to display find/display the comment headers first.
parent 0c68700b
Pipeline #985 passed with stage
in 16 minutes and 26 seconds
......@@ -272,19 +272,19 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post)
show_msghdr(smb, msg);
int comments=0;
for(int i = 0; i < msg->total_hfields; i++)
if(msg->hfield[i].type == SMB_COMMENT) {
bprintf("%s\r\n", (char*)msg->hfield_dat[i]);
comments++;
}
if(comments)
CRLF;
if(msg->hdr.type == SMB_MSG_TYPE_POLL && post != NULL && smb->subnum < cfg.total_subs) {
char* answer;
int longest_answer = 0;
int comments=0;
for(int i = 0; i < msg->total_hfields; i++)
if(msg->hfield[i].type == SMB_COMMENT) {
bprintf("%s\r\n", (char*)msg->hfield_dat[i]);
comments++;
}
if(comments)
CRLF;
for(int i = 0; i < msg->total_hfields; i++) {
if(msg->hfield[i].type != SMB_POLL_ANSWER)
continue;
......@@ -332,7 +332,7 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post)
mnemonics(text[VoteInThisPollNow]);
return true;
}
if((txt=smb_getmsgtxt(smb, msg, 0)) == NULL)
if((txt=smb_getmsgtxt(smb, msg, GETMSGTXT_BODY_ONLY)) == NULL)
return false;
char* p = txt;
if(!(console&CON_RAW_IN)) {
......
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