Fixes for hiding wwivnet kludges

This commit is contained in:
Andrew Pamment 2016-04-04 11:04:11 +10:00
parent d91ef3f1d4
commit eb1d187207

View File

@ -576,12 +576,19 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh
JAM_ReadMsgText(jb, msghs->msgs[mailno]->msg_h->TxtOffset, msghs->msgs[mailno]->msg_h->TxtLen, (char *)body); JAM_ReadMsgText(jb, msghs->msgs[mailno]->msg_h->TxtOffset, msghs->msgs[mailno]->msg_h->TxtLen, (char *)body);
JAM_WriteLastRead(jb, user->id, &jlr); JAM_WriteLastRead(jb, user->id, &jlr);
if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_WWIV) {
body2 = (char *)malloc(msghs->msgs[mailno]->msg_h->TxtLen); body2 = (char *)malloc(msghs->msgs[mailno]->msg_h->TxtLen);
z2 = 0; z2 = 0;
for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) { for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) {
if (body[z] == '\r') { if (body[z] == '\r') {
body[z2++] = '\r'; body2[z2++] = '\r';
z++;
if (body[z+1] == 4 && body[z+2] == '0') {
skip_line = 1;
} else {
skip_line = 0;
}
} else if (body[z] == '\n') {
if (body[z+1] == 4 && body[z+2] == '0') { if (body[z+1] == 4 && body[z+2] == '0') {
skip_line = 1; skip_line = 1;
} else { } else {
@ -589,7 +596,7 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh
} }
} else { } else {
if (!skip_line) { if (!skip_line) {
if (body[z] == 03 || body[z] == 02) { if (body[z] == 3 || body[z] == 4) {
z++; z++;
} else { } else {
body2[z2++] = body[z]; body2[z2++] = body[z];
@ -600,6 +607,7 @@ void read_message(int socket, struct user_record *user, struct msg_headers *msgh
free(body); free(body);
body = body2; body = body2;
}
for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) { for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) {
if (body[z] == '\r') { if (body[z] == '\r') {