From 5a07b272f92f8b0a3d11e2e085d001853bff7f59 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 27 Jun 2002 06:41:24 +0000 Subject: [PATCH] Added additional bool parameter to msgbase get_msg_body call to enable rfc822 encoding of message text. --- exec/newslink.js | 14 +++++--------- exec/nntpservice.js | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/exec/newslink.js b/exec/newslink.js index ac2daa149f..dddb24ba58 100644 --- a/exec/newslink.js +++ b/exec/newslink.js @@ -232,6 +232,7 @@ for(i in area) { body = msgbase.get_msg_body(false, ptr ,true /* remove ctrl-a codes */ + ,true /* rfc822 formatted text */ ,true /* include tails */); if(body == null) { printf("!FAILED to read message number %ld",ptr); @@ -262,20 +263,15 @@ for(i in area) { ,hdr.from ,antispam,hdr.from_net_addr)); else - writeln(format("From: \"%s\" <%s%s@%s%s>" + writeln(format("From: \"%s\" <%s@%s%s>" ,hdr.from - ,antispam,hdr.from + ,hdr.from.replace(/ /g,"_") ,antispam,hdr.from_net_addr)); } - else if(hdr.from.indexOf(' ')>0) - writeln(format("From: \"%s\" <\"%s%s\"@%s%s>" - ,hdr.from - ,antispam,hdr.from - ,antispam,system.inetaddr)); else - writeln(format("From: \"%s\" <%s%s@%s%s>" + writeln(format("From: \"%s\" <%s@%s%s>" ,hdr.from - ,antispam,hdr.from + ,hdr.from.replace(/ /g,"_") ,antispam,system.inetaddr)); writeln("To: " + hdr.to); writeln("X-Comment-To: " + hdr.to); diff --git a/exec/nntpservice.js b/exec/nntpservice.js index 742593f880..fcd2a77458 100644 --- a/exec/nntpservice.js +++ b/exec/nntpservice.js @@ -296,7 +296,8 @@ while(client.socket.is_connected) { hdr=msgbase.get_msg_header(false,current_article); if(cmd[0].toUpperCase()!="HEAD") body=msgbase.get_msg_body(false,current_article - ,true /* remove ctrl-a codes */); + ,true /* remove ctrl-a codes */ + ,true /* rfc822 formatted text */); /* Eliminate dupe loops if(user.security.restrictions&UFLAG_Q && hdr!=null) -- GitLab