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,31 +576,39 @@ 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);
body2 = (char *)malloc(msghs->msgs[mailno]->msg_h->TxtLen); if (conf.mail_conferences[user->cur_mail_conf]->nettype == NETWORK_WWIV) {
z2 = 0; body2 = (char *)malloc(msghs->msgs[mailno]->msg_h->TxtLen);
for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) { z2 = 0;
if (body[z] == '\r') { for (z=0;z<msghs->msgs[mailno]->msg_h->TxtLen;z++) {
body[z2++] = '\r'; if (body[z] == '\r') {
body2[z2++] = '\r';
if (body[z+1] == 4 && body[z+2] == '0') { z++;
skip_line = 1; if (body[z+1] == 4 && body[z+2] == '0') {
} else { skip_line = 1;
skip_line = 0;
}
} else {
if (!skip_line) {
if (body[z] == 03 || body[z] == 02) {
z++;
} else { } else {
body2[z2++] = body[z]; skip_line = 0;
}
} else if (body[z] == '\n') {
if (body[z+1] == 4 && body[z+2] == '0') {
skip_line = 1;
} else {
skip_line = 0;
}
} else {
if (!skip_line) {
if (body[z] == 3 || body[z] == 4) {
z++;
} else {
body2[z2++] = body[z];
}
} }
} }
} }
free(body);
body = body2;
} }
free(body);
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') {
s_putstring(socket, "\r\n"); s_putstring(socket, "\r\n");