From b8c3a96b3fe509b804b615429f817055c2f2fe38 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 14 Feb 2002 03:03:55 +0000 Subject: [PATCH] Added support for stripping FidoNet Kludge lines from messages created by external message editors (e.g. DCTedit and ICEedit). --- src/sbbs3/sbbsdefs.h | 1 + src/sbbs3/writemsg.cpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/sbbsdefs.h b/src/sbbs3/sbbsdefs.h index da5ab20110..21e8860306 100644 --- a/src/sbbs3/sbbsdefs.h +++ b/src/sbbs3/sbbsdefs.h @@ -376,6 +376,7 @@ typedef enum { /* Values for xtrn_t.event */ #define QUOTEALL (1L<<12) /* Automatically quote all of msg */ #define QUOTENONE (1L<<13) /* Automatically quote none of msg */ #define XTRN_NATIVE (1L<<14) /* Native application */ +#define STRIPKLUDGE (1L<<15) /* Strip FTN Kludge lines from msg */ /* Bits in user.qwk */ #define QWK_FILES (1L<<0) /* Include new files list */ diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp index 9d9426ae6d..20102172c2 100644 --- a/src/sbbs3/writemsg.cpp +++ b/src/sbbs3/writemsg.cpp @@ -373,12 +373,21 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum && cfg.xedit[useron.xedit-1]->misc&QUICKBBS) { fwrite(crlf,2,1,stream); i++; - continue; } + continue; + } + /* Expand LF to CRLF? */ if(buf[l]==LF && (!l || buf[l-1]!=CR) && useron.xedit && cfg.xedit[useron.xedit-1]->misc&EXPANDLF) { fwrite(crlf,2,1,stream); i++; - continue; } + continue; + } + /* Strip FidoNet Kludge Lines? */ + if(buf[l]==1 && useron.xedit + && cfg.xedit[useron.xedit-1]->misc&STRIPKLUDGE) { + while(buf[l]!=LF) l++; + continue; + } if(!(mode&(WM_EMAIL|WM_NETMAIL)) && (!l || buf[l-1]==LF) && buf[l]=='-' && buf[l+1]=='-' && buf[l+2]=='-' -- GitLab