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 12fde4ab authored by Rob Swindell's avatar Rob Swindell 💬

Add/use P_REMOTE print-mode flag to bputs()

Do nothing if online != ON_REMOTE. Eliminates some if(online == ON_REMOTE) clauses.
parent 908618c8
Pipeline #1909 passed with stage
in 10 minutes and 8 seconds
......@@ -47,6 +47,7 @@ char* sbbs_t::auto_utf8(const char* str, long* mode)
P_AUTO_UTF8
P_NOATCODES
P_TRUNCATE
P_REMOTE
****************************************************************************/
int sbbs_t::bputs(const char *str, long mode)
{
......@@ -54,6 +55,9 @@ int sbbs_t::bputs(const char *str, long mode)
ulong l=0;
long term = term_supports();
if((mode & P_REMOTE) && online != ON_REMOTE)
return 0;
if(online==ON_LOCAL && console&CON_L_ECHO) /* script running as event */
return(lputs(LOG_INFO, str));
......
......@@ -488,8 +488,7 @@ bool sbbs_t::qwk_import_msg(FILE *qwk_fp, char *hdrblk, ulong blocks
smb_hfield_str(msg, FIDOCHARSET, charset);
}
if(online==ON_REMOTE)
bputs(text[WritingIndx]);
bputs(P_REMOTE, text[WritingIndx]);
if(smb->status.max_crcs==0) /* no CRC checking means no body text dupe checking */
dupechk_hashes&=~(1<<SMB_HASH_SOURCE_BODY);
......
......@@ -752,6 +752,7 @@ typedef enum { /* Values for xtrn_t.event */
#define P_NOXATTRS (1<<15) /* No "Extra Attribute Codes" supported */
#define P_MARKUP (1<<16) /* Support StyleCodes/Rich/StructuredText */
#define P_HIDEMARKS (1<<17) /* Hide the mark-up characters */
#define P_REMOTE (1<<18) /* Only print when online == ON_REMOTE */
/* Bits in 'mode' for listfiles */
#define FL_ULTIME (1<<0) /* List files by upload time */
......
......@@ -338,8 +338,7 @@ bool sbbs_t::unpack_rep(char* repfile)
useron.etoday++;
putuserrec(&cfg,useron.number,U_ETODAY,5
,ultoa(useron.etoday,tmp,10));
if(online == ON_REMOTE)
bprintf(text[Emailed],username(&cfg,usernum,tmp),usernum);
bprintf(P_REMOTE, text[Emailed],username(&cfg,usernum,tmp),usernum);
SAFEPRINTF2(str,"sent QWK e-mail to %s #%d"
,username(&cfg,usernum,tmp),usernum);
logline("E+",str);
......@@ -374,7 +373,7 @@ bool sbbs_t::unpack_rep(char* repfile)
else { /* message on a sub-board */
/**************************/
if((n=resolve_qwkconf(confnum))==INVALID_SUB) {
bprintf(text[QWKInvalidConferenceN],confnum);
bprintf(P_REMOTE, text[QWKInvalidConferenceN],confnum);
SAFEPRINTF(str,"Invalid QWK conference number %ld", confnum);
logline(LOG_NOTICE,"P!",str);
errors++;
......@@ -514,9 +513,8 @@ bool sbbs_t::unpack_rep(char* repfile)
,/* fromhub: */0, &smb, /* touser: */0, &msg, &dupe)) {
logon_posts++;
user_posted_msg(&cfg, &useron, 1);
if(online == ON_REMOTE)
bprintf(text[Posted],cfg.grp[cfg.sub[n]->grp]->sname
,cfg.sub[n]->lname);
bprintf(P_REMOTE, text[Posted],cfg.grp[cfg.sub[n]->grp]->sname
,cfg.sub[n]->lname);
SAFEPRINTF2(str,"posted QWK message on %s %s"
,cfg.grp[cfg.sub[n]->grp]->sname,cfg.sub[n]->lname);
signal_sub_sem(&cfg,n);
......
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