Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit 733ddc69 authored by Rob Swindell's avatar Rob Swindell 💬

If all waiting-mail has been read, don't default to "Yes" read mail

Count the read mail-waiting and compare to the total mail-waiting and if they're the same, then default to "No" for the "Read Your Mail Now" prompt during logon.

Also, pass the difference (the unread mail) to the LiMailWaiting logon-info line.

As requested by altere via I.R.C.
parent 5038e235
Pipeline #680 passed with stage
in 16 minutes and 21 seconds
......@@ -49,7 +49,7 @@ bool sbbs_t::logon()
char str[256],c;
char tmp[512];
int file;
uint i,j,mailw;
uint i,j,mailw,mailr;
long kmode;
ulong totallogons;
node_t node;
......@@ -460,7 +460,8 @@ bool sbbs_t::logon()
sys_status|=SS_PAUSEON; /* always force pause on during this section */
mailw=getmail(&cfg,useron.number,/* Sent: */FALSE, /* SPAM: */FALSE);
mailw=getmail(&cfg,useron.number,/* Sent: */FALSE, /* attr: */0);
mailr=getmail(&cfg,useron.number,/* Sent: */FALSE, /* attr: */MSG_READ);
if(!(cfg.sys_misc&SM_NOSYSINFO)) {
......@@ -470,7 +471,7 @@ bool sbbs_t::logon()
bprintf(text[LiMailWaiting],mailw, mailw-mailr);
, text[sysop_available(&cfg) ? LiSysopAvailable : LiSysopNotAvailable]);
......@@ -535,7 +536,8 @@ bool sbbs_t::logon()
rioctl(IOSM|ABORT); /* Turn abort ability on */
if(text[ReadYourMailNowQ][0] && mailw) {
if((mailw == mailr && noyes(text[ReadYourMailNowQ]))
|| (mailw != mailr && yesno(text[ReadYourMailNowQ])))
if(usrgrps && useron.misc&ASK_NSCAN && text[NScanAllGrpsQ][0] && yesno(text[NScanAllGrpsQ]))
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