add another suggestion from avon

This commit is contained in:
Andrew Pamment 2016-04-22 22:04:03 +10:00
parent 4eae3d60a6
commit 86167c1a4d

View File

@ -1186,7 +1186,7 @@ int mail_menu(int socket, struct user_record *user) {
int i; int i;
int j; int j;
int z; int z;
int k;
struct msg_headers *msghs; struct msg_headers *msghs;
s_JamBase *jb; s_JamBase *jb;
@ -1526,14 +1526,23 @@ int mail_menu(int socket, struct user_record *user) {
jlr.LastReadMsg = 0; jlr.LastReadMsg = 0;
jlr.HighReadMsg = 0; jlr.HighReadMsg = 0;
} }
sprintf(buffer, "Start at message [0-%d] ? ", msghs->msg_count - 1); sprintf(buffer, "Start at message [0-%d] or N for New? ", msghs->msg_count - 1);
s_putstring(socket, buffer); s_putstring(socket, buffer);
s_readstring(socket, buffer, 6); s_readstring(socket, buffer, 6);
if (tolower(buffer[0]) == 'n') {
k = jlr.HighReadMsg;
for (i=0;i<msghs->msg_count;i++) {
if (msghs->msgs[i]->msg_no == k) {
break;
}
}
} else {
i = atoi(buffer); i = atoi(buffer);
if (i < 0) { if (i < 0) {
i = 0; i = 0;
} }
}
closed = 0; closed = 0;
s_putstring(socket, "\e[2J\e[1;37;44m[MSG#] Subject From To Date \r\n\e[0m"); s_putstring(socket, "\e[2J\e[1;37;44m[MSG#] Subject From To Date \r\n\e[0m");