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

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 b9e636d3
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ bool sbbs_t::logon() ...@@ -49,7 +49,7 @@ bool sbbs_t::logon()
char str[256],c; char str[256],c;
char tmp[512]; char tmp[512];
int file; int file;
uint i,j,mailw; uint i,j,mailw,mailr;
long kmode; long kmode;
ulong totallogons; ulong totallogons;
node_t node; node_t node;
...@@ -460,7 +460,8 @@ bool sbbs_t::logon() ...@@ -460,7 +460,8 @@ bool sbbs_t::logon()
return(true); return(true);
sys_status|=SS_PAUSEON; /* always force pause on during this section */ 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)) { if(!(cfg.sys_misc&SM_NOSYSINFO)) {
bprintf(text[SiSysName],cfg.sys_name); bprintf(text[SiSysName],cfg.sys_name);
...@@ -470,7 +471,7 @@ bool sbbs_t::logon() ...@@ -470,7 +471,7 @@ bool sbbs_t::logon()
,cfg.level_callsperday[useron.level]); ,cfg.level_callsperday[useron.level]);
bprintf(text[LiTimeonToday],useron.ttoday bprintf(text[LiTimeonToday],useron.ttoday
,cfg.level_timeperday[useron.level]+useron.min); ,cfg.level_timeperday[useron.level]+useron.min);
bprintf(text[LiMailWaiting],mailw); bprintf(text[LiMailWaiting],mailw, mailw-mailr);
bprintf(text[LiSysopIs] bprintf(text[LiSysopIs]
, text[sysop_available(&cfg) ? LiSysopAvailable : LiSysopNotAvailable]); , text[sysop_available(&cfg) ? LiSysopAvailable : LiSysopNotAvailable]);
newline(); newline();
...@@ -535,7 +536,8 @@ bool sbbs_t::logon() ...@@ -535,7 +536,8 @@ bool sbbs_t::logon()
if(online==ON_REMOTE) if(online==ON_REMOTE)
rioctl(IOSM|ABORT); /* Turn abort ability on */ rioctl(IOSM|ABORT); /* Turn abort ability on */
if(text[ReadYourMailNowQ][0] && mailw) { if(text[ReadYourMailNowQ][0] && mailw) {
if(yesno(text[ReadYourMailNowQ])) if((mailw == mailr && noyes(text[ReadYourMailNowQ]))
|| (mailw != mailr && yesno(text[ReadYourMailNowQ])))
readmail(useron.number,MAIL_YOUR); readmail(useron.number,MAIL_YOUR);
} }
if(usrgrps && useron.misc&ASK_NSCAN && text[NScanAllGrpsQ][0] && yesno(text[NScanAllGrpsQ])) if(usrgrps && useron.misc&ASK_NSCAN && text[NScanAllGrpsQ][0] && yesno(text[NScanAllGrpsQ]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment