diff --git a/src/sbbs3/readmail.cpp b/src/sbbs3/readmail.cpp index 9a5877acb6539ce347f38cca44b8ec1ace1c7a80..a1fa4c7a5906bfce916c8ab631ccba1d2150ee1c 100644 --- a/src/sbbs3/readmail.cpp +++ b/src/sbbs3/readmail.cpp @@ -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;