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

Calculates and displays number of sub-boards scanned for new messages.

parent ef9552c8
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) ...@@ -53,6 +53,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
ulong mailmsgs=0; ulong mailmsgs=0;
ulong totalcdt,totaltime,lastmsg ulong totalcdt,totaltime,lastmsg
,files,submsgs,msgs,netfiles=0,preqwk=0; ,files,submsgs,msgs,netfiles=0,preqwk=0;
ulong subs_scanned=0;
float f; /* Sparky is responsible */ float f; /* Sparky is responsible */
time_t start; time_t start;
node_t node; node_t node;
...@@ -308,6 +309,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) ...@@ -308,6 +309,7 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
if(useron.rest&FLAG('Q') && !(cfg.sub[usrsub[i][j]]->misc&SUB_QNET)) if(useron.rest&FLAG('Q') && !(cfg.sub[usrsub[i][j]]->misc&SUB_QNET))
continue; /* QWK Net Node and not QWK networked, so skip */ continue; /* QWK Net Node and not QWK networked, so skip */
subs_scanned++;
msgs=getlastmsg(usrsub[i][j],&lastmsg,0); msgs=getlastmsg(usrsub[i][j],&lastmsg,0);
if(!msgs || lastmsg<=sub_ptr[usrsub[i][j]]) { /* no msgs */ if(!msgs || lastmsg<=sub_ptr[usrsub[i][j]]) { /* no msgs */
if(sub_ptr[usrsub[i][j]]>lastmsg) { /* corrupted ptr */ if(sub_ptr[usrsub[i][j]]>lastmsg) { /* corrupted ptr */
...@@ -420,7 +422,14 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) ...@@ -420,7 +422,14 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
if(l<posts) if(l<posts)
break; } break; }
if(j<usrsubs[i]) /* if sub aborted, abort all */ if(j<usrsubs[i]) /* if sub aborted, abort all */
break; } break;
}
sprintf(str,"Scanned %lu sub-boards for new messages",subs_scanned);
if(online==ON_LOCAL) /* event */
eprintf(str);
else
lprintf(str);
if((*msgcnt)+mailmsgs && time(NULL)-start) { if((*msgcnt)+mailmsgs && time(NULL)-start) {
bprintf("\r\n\r\n\1n\1hPacked %lu messages in %lu seconds " bprintf("\r\n\r\n\1n\1hPacked %lu messages in %lu seconds "
...@@ -441,7 +450,8 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack) ...@@ -441,7 +450,8 @@ bool sbbs_t::pack_qwk(char *packet, ulong *msgcnt, bool prepack)
fclose(personal); /* close PERSONAL.NDX */ fclose(personal); /* close PERSONAL.NDX */
sprintf(str,"%sPERSONAL.NDX",cfg.temp_dir); sprintf(str,"%sPERSONAL.NDX",cfg.temp_dir);
if(!flength(str)) if(!flength(str))
remove(str); } remove(str);
}
CRLF; CRLF;
if(!prepack && (sys_status&SS_ABORT || !online)) if(!prepack && (sys_status&SS_ABORT || !online))
......
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