Commit 2cb9a73b authored by rswindell's avatar rswindell
Browse files

Experimental feature: 'U' command toggles un-read mail visibility.

Change the 'Edit Author's user account' command to '!' (for now).
parent 78ee48ca
......@@ -410,9 +410,9 @@ void sbbs_t::readmail(uint usernumber, int which)
bprintf(text[ReadingAllMail],smb.curmsg+1,smb.msgs);
else
bprintf(text[ReadingMail],smb.curmsg+1,smb.msgs);
sprintf(str,"ADFLNQRT?<>[]{}-+/");
sprintf(str,"ADFLNQRTU?<>[]{}-+/");
if(SYSOP)
strcat(str,"CUSPH");
strcat(str,"C!SPH");
if(which == MAIL_YOUR)
strcat(str,"K"); // kill all (visible)
else
......@@ -785,7 +785,7 @@ void sbbs_t::readmail(uint usernumber, int which)
}
smb.curmsg=(u-1);
break;
case 'U': /* user edit */
case '!': /* user edit */
msg.hdr.number=msg.idx.number;
smb_getmsgidx(&smb,&msg);
if((unum=(which==MAIL_SENT ? msg.idx.to : msg.idx.from)) == 0)
......@@ -796,6 +796,21 @@ void sbbs_t::readmail(uint usernumber, int which)
} else
useredit(unum);
break;
case 'U': /* View Unread-Only (toggle) */
{
domsg = false;
if(!(lm_mode&LM_UNREAD)) {
if(!getmail(&cfg, usernumber, /* Sent: */FALSE, /* attr: */0)) {
bprintf(text[NoMailWaiting], "Un-read");
break;
}
}
lm_mode ^= LM_UNREAD;
bputs(text[DisplayUnreadMessagesOnlyQ]);
bputs((lm_mode&LM_UNREAD) ? text[On] : text[Off]);
CRLF;
break;
}
case 'V': /* View SPAM (toggle) */
{
domsg = false;
......@@ -808,7 +823,7 @@ void sbbs_t::readmail(uint usernumber, int which)
bprintf(text[NoMailWaiting], "HAM");
break;
}
bprintf(text[SPAMVisibilityIsNow]);
bputs(text[SPAMVisibilityIsNow]);
switch(lm_mode&(LM_SPAMONLY | LM_NOSPAM)) {
case 0:
lm_mode |= LM_NOSPAM;
......
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