Commit 3b8150b8 authored by rswindell's avatar rswindell
Browse files

The [U]ser edit command from the mail reading prompt will now edit the "To"

user if the "From" user is not a valid account.
parent 95c7496e
......@@ -48,6 +48,7 @@ void sbbs_t::readmail(uint usernumber, int which)
int i,j;
int error;
int mismatches=0,act;
uint unum;
long length,l,lm_mode;
ulong last;
bool replied;
......@@ -700,11 +701,13 @@ void sbbs_t::readmail(uint usernumber, int which)
case 'U': /* user edit */
msg.hdr.number=msg.idx.number;
smb_getmsgidx(&smb,&msg);
if((which==MAIL_SENT ? msg.idx.to : msg.idx.from) == 0) {
if((unum=(which==MAIL_SENT ? msg.idx.to : msg.idx.from)) == 0)
unum=(which==MAIL_SENT ? msg.idx.from : msg.idx.to);
if(unum == 0 || unum > lastuser(&cfg)) {
bputs(text[UnknownUser]);
domsg=false;
} else
useredit(which==MAIL_SENT ? msg.idx.to : msg.idx.from);
useredit(unum);
break;
case 'P': /* Purge author and all mail to/from */
if(noyes(text[UeditDeleteQ]))
......
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