Commit bccd6394 authored by rswindell's avatar rswindell
Browse files

When printing the CantDeleteMsg text line, incude the message number.

The (O)perator (D)elete message (range) command will now skip permanent msgs.
Fixed bug with (L)ist msgs command while in (S)earch for Your Messages mode
(the msg numbers listed did not match the msg numbers used by the Read prompt).
parent 0f796380
......@@ -73,7 +73,7 @@ long sbbs_t::listmsgs(uint subnum, long mode, post_t *post, long i, long posts)
smb_unlockmsghdr(&smb,&msg);
if(listed==0)
bputs(text[MailOnSystemLstHdr]);
bprintf(text[SubMsgLstFmt],post[i].num
bprintf(text[SubMsgLstFmt], i+1
,msg.hdr.attr&MSG_ANONYMOUS && !sub_op(subnum)
? text[Anonymous] : msg.from
,msg.to
......@@ -964,7 +964,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
break;
}
if(cfg.sub[subnum]->misc&SUB_DELLAST && smb.curmsg!=(smb.msgs-1)) {
bputs(text[CantDeleteMsg]);
bprintf(text[CantDeleteMsg], smb.curmsg + 1);
domsg=0;
break;
}
......@@ -977,7 +977,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
}
}
if(msg.hdr.attr&MSG_PERMANENT) {
bputs(text[CantDeleteMsg]);
bprintf(text[CantDeleteMsg], smb.curmsg + 1);
domsg=0;
break;
}
......@@ -1407,6 +1407,11 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find)
already++;
continue; // Already deleted
}
if(post[n - 1].idx.attr & MSG_PERMANENT) {
bprintf(text[CantDeleteMsg], smb.curmsg + 1);
failed++;
continue;
}
smb_freemsgmem(&msg);
msg.idx.offset = 0;
msg.idx.number = post[n - 1].idx.number;
......
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