From ba8f0be2ac7d298cd3b4d7dfad4b1bd4dc07e3db Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Tue, 27 Nov 2001 21:15:28 +0000 Subject: [PATCH] Fixed ReadChangeAttributes behaviour, cosmetic fixes --- golded3/gectrl.cpp | 24 ++++++++++++++++-------- golded3/geline.cpp | 1 + golded3/geusrbse.cpp | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index b6f5ce6..0dbb863 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -241,11 +241,12 @@ void DoKludges(int mode, GMsg* msg, int kludges) { // Strip all the kludges we insert ourselves - int stripkludges = (~kludges)&(GKLUD_RFC|GKLUD_FWD|GKLUD_INTL|GKLUD_FMPT|GKLUD_TOPT|GKLUD_FLAGS|GKLUD_AREA|GKLUD_MSGID|GKLUD_REPLY|GKLUD_PID|GKLUD_CHARSET|GKLUD_KNOWN|GKLUD_PATH|GKLUD_SEENBY); + if(kludges == 0) + kludges = (GKLUD_RFC|GKLUD_FWD|GKLUD_INTL|GKLUD_FMPT|GKLUD_TOPT|GKLUD_FLAGS|GKLUD_AREA|GKLUD_MSGID|GKLUD_REPLY|GKLUD_PID|GKLUD_CHARSET|GKLUD_KNOWN|GKLUD_PATH|GKLUD_SEENBY); while(line) { - if(line->kludge & stripkludges) { + if(line->kludge & kludges) { bool waswrapped; do { waswrapped = (line->type & GLINE_WRAP) ? true : false; @@ -504,12 +505,19 @@ void DoKludges(int mode, GMsg* msg, int kludges) { } if(AA->Internetrfcbody() and not AA->isnewsgroup() and line->next) { - const char *nline_txt = line->next->txt.c_str(); - if(not strblank(nline_txt) and not strnieql(nline_txt, "XPost:", 6) and - not strnieql(nline_txt, "Copy:", 5) and not strnieql(nline_txt, "BCopy:", 6)) { - line = AddKludge(line, ""); - line->kludge = GKLUD_RFC; - } + do { + const char *nline_txt = line->next->txt.c_str(); + if(strblank(nline_txt)) + break; + else if(not strnieql(nline_txt, "XPost:", 6) and + not strnieql(nline_txt, "Copy:", 5) and + not strnieql(nline_txt, "BCopy:", 6)) { + line = AddKludge(line, ""); + line->kludge = GKLUD_RFC; + break; + } + line = line->next; + } while(line->next); } } else { diff --git a/golded3/geline.cpp b/golded3/geline.cpp index a22a108..80235bc 100644 --- a/golded3/geline.cpp +++ b/golded3/geline.cpp @@ -2561,6 +2561,7 @@ void MakeLineIndex(GMsg* msg, int margin, bool getvalue, bool header_recode) { else { if(headerlines) { linep->type |= GLINE_KLUD; + linep->kludge = GKLUD_RFC; linep->color = C_READK; } if(--irfcbody == 0) diff --git a/golded3/geusrbse.cpp b/golded3/geusrbse.cpp index 314969e..971cf17 100644 --- a/golded3/geusrbse.cpp +++ b/golded3/geusrbse.cpp @@ -856,7 +856,7 @@ bool guserbase::lookup_addressbook(GMsg* msg, char* name, char* aka, bool browse found = true; - if(not strblank(entry.iaddr) and not AA->isinternet()) { + if(not entry.fidoaddr.valid() and not strblank(entry.iaddr) and not AA->isinternet()) { // do UUCP addressing strcpy(msg->realto, entry.name); if(*AA->Internetgate().name)