Skip to content
Snippets Groups Projects
Commit 51848214 authored by rswindell's avatar rswindell
Browse files

New @-codes: MSG_TO_NETTYPE and MSG_FROM_NETTTYPE.

Bug-fix: MSG_TO_NET would not expand properly (to a blank string) when the
to_net.type header value was NET_NONE.
parent 1397808c
Branches
Tags
No related merge requests found
......@@ -939,8 +939,16 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen)
return(nulstr);
return(current_msg->to_ext);
}
if(!strcmp(sp,"MSG_TO_NET") && current_msg!=NULL)
if(!strcmp(sp,"MSG_TO_NET") && current_msg!=NULL) {
if(current_msg->to_net.type==NET_NONE)
return nulstr;
return(smb_netaddrstr(&current_msg->to_net,str));
}
if(!strcmp(sp,"MSG_TO_NETTYPE") && current_msg!=NULL) {
if(current_msg->to_net.type==NET_NONE)
return nulstr;
return(smb_nettype((enum smb_net_type)current_msg->to_net.type));
}
if(!strcmp(sp,"MSG_FROM") && current_msg!=NULL) {
if(current_msg->from==NULL)
return(nulstr);
......@@ -975,6 +983,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen)
return(smb_netaddrstr(&current_msg->from_net,str));
return(nulstr);
}
if(!strcmp(sp,"MSG_FROM_NETTYPE") && current_msg!=NULL) {
if(current_msg->from_net.type==NET_NONE)
return nulstr;
return(smb_nettype((enum smb_net_type)current_msg->from_net.type));
}
if(!strcmp(sp,"MSG_SUBJECT") && current_msg!=NULL)
return(current_msg->subj==NULL ? nulstr : current_msg->subj);
if(!strcmp(sp,"MSG_DATE") && current_msg!=NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment