Skip to content
Snippets Groups Projects
Commit 4a824f52 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #985 passed
...@@ -272,10 +272,6 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post) ...@@ -272,10 +272,6 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post)
show_msghdr(smb, msg); show_msghdr(smb, msg);
if(msg->hdr.type == SMB_MSG_TYPE_POLL && post != NULL && smb->subnum < cfg.total_subs) {
char* answer;
int longest_answer = 0;
int comments=0; int comments=0;
for(int i = 0; i < msg->total_hfields; i++) for(int i = 0; i < msg->total_hfields; i++)
if(msg->hfield[i].type == SMB_COMMENT) { if(msg->hfield[i].type == SMB_COMMENT) {
...@@ -285,6 +281,10 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post) ...@@ -285,6 +281,10 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post)
if(comments) if(comments)
CRLF; CRLF;
if(msg->hdr.type == SMB_MSG_TYPE_POLL && post != NULL && smb->subnum < cfg.total_subs) {
char* answer;
int longest_answer = 0;
for(int i = 0; i < msg->total_hfields; i++) { for(int i = 0; i < msg->total_hfields; i++) {
if(msg->hfield[i].type != SMB_POLL_ANSWER) if(msg->hfield[i].type != SMB_POLL_ANSWER)
continue; continue;
...@@ -332,7 +332,7 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post) ...@@ -332,7 +332,7 @@ bool sbbs_t::show_msg(smb_t* smb, smbmsg_t* msg, long p_mode, post_t* post)
mnemonics(text[VoteInThisPollNow]); mnemonics(text[VoteInThisPollNow]);
return true; return true;
} }
if((txt=smb_getmsgtxt(smb, msg, 0)) == NULL) if((txt=smb_getmsgtxt(smb, msg, GETMSGTXT_BODY_ONLY)) == NULL)
return false; return false;
char* p = txt; char* p = txt;
if(!(console&CON_RAW_IN)) { if(!(console&CON_RAW_IN)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment