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

Define and use 3 new text.dat strings for netmail sent confirmation

Sent to terminal user after successfully sending netmail:
- InternetMailSent
- FidoNetMailSent
- QWKNetMailSent

As requested by Keyop in irc.
parent 6f60905f
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1427 passed
......@@ -341,6 +341,8 @@ bool sbbs_t::netmail(const char *into, const char *title, long mode, smb_t* resm
useron.etoday = (ushort)adjustuserrec(&cfg, useron.number, U_ETODAY, 0, 1);
if(!(useron.exempt&FLAG('S')))
subtract_cdt(&cfg,&useron,cfg.netmail_cost);
bprintf(text[FidoNetMailSent], to, smb_faddrtoa(&dest_addr,tmp));
if(mode&WM_FILE)
SAFEPRINTF2(str,"sent NetMail file attachment to %s (%s)"
,to, smb_faddrtoa(&dest_addr,tmp));
......@@ -734,6 +736,10 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
if(qnet)
bprintf(text[QWKNetMailSent], name, fulladdr);
else
bprintf(text[InternetMailSent], name, to);
safe_snprintf(str,sizeof(str), "%s (%s) sent %s NetMail to %s (%s) via QWK"
,sender, sender_id
,qnet ? "QWK":"Internet",name,qnet ? fulladdr : to);
......@@ -912,6 +918,7 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
bprintf(text[FidoNetMailSent], hdr.to, smb_faddrtoa(&fidoaddr,tmp));
sprintf(str,"%s sent NetMail to %s @%s via QWK"
,sender_id
,hdr.to,smb_faddrtoa(&fidoaddr,tmp));
......@@ -1239,6 +1246,7 @@ bool sbbs_t::inetmail(const char *into, const char *subj, long mode, smb_t* resm
useron.etoday += (ushort)rcpt_count;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
bprintf(text[InternetMailSent], to_list);
SAFEPRINTF(str, "sent Internet Mail to %s", to_list);
logline("EN",str);
return(true);
......@@ -1443,6 +1451,7 @@ bool sbbs_t::qnetmail(const char *into, const char *subj, long mode, smb_t* resm
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5,ultoa(useron.etoday,tmp,10));
bprintf(text[QWKNetMailSent], to, fulladdr);
SAFEPRINTF2(str,"sent QWK NetMail to %s (%s)"
,to,fulladdr);
logline("EN",str);
......
......@@ -854,6 +854,9 @@ enum {
,SpinningCursor8
,SpinningCursor9
,HowManyColumns
,InternetMailSent
,FidoNetMailSent
,QWKNetMailSent
,TOTAL_TEXT
};
......
......@@ -1386,4 +1386,10 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\xfa\xf9\xfe\xf9" // 842 SpinningCursor9
,"\x01\x5f\x01\x62\x01\x68\x5b\x01\x63\x40\x43\x48\x45\x43\x4b\x4d\x41\x52\x4b\x40\x01\x62\x5d\x20\x01\x79\x54\x65\x72\x6d\x69\x6e"
"\x61\x6c\x20\x63\x6f\x6c\x75\x6d\x6e\x73\x20\x5b\x01\x77\x41\x75\x74\x6f\x01\x79\x5d\x3a\x20\x01\x6e" // 843 HowManyColumns
,"\x01\x5b\x01\x6e\x01\x6d\x49\x6e\x74\x65\x72\x6e\x65\x74\x20\x6d\x61\x69\x6c\x20\x73\x65\x6e\x74\x20\x74\x6f\x20\x01\x68\x25\x73"
"\x01\x6e\x0d\x0a" // 844 InternetMailSent
,"\x01\x5b\x01\x6e\x01\x6d\x46\x69\x64\x6f\x20\x4e\x65\x74\x4d\x61\x69\x6c\x20\x73\x65\x6e\x74\x20\x74\x6f\x20\x01\x68\x25\x73\x20"
"\x40\x25\x73\x01\x6e\x0d\x0a" // 845 FidoNetMailSent
,"\x01\x5b\x01\x6e\x01\x6d\x51\x57\x4b\x20\x4e\x65\x74\x4d\x61\x69\x6c\x20\x73\x65\x6e\x74\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x28"
"\x25\x73\x29\x01\x6e\x0d\x0a" // 846 QWKNetMailSent
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment