From 5d0bf484fc250a92d04b2f5c0e412a51f2a6095f Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Mon, 19 Sep 2005 17:29:29 +0000 Subject: [PATCH] New feature: AKAMATCHFROMTO --- cfgs/config/advanced.cfg | 7 +++++-- cfgs/config/advanced.rus | 5 ++++- docs/notework.txt | 6 ++++++ golded3/gccfgg.cpp | 1 + golded3/gccfgg.h | 1 + golded3/gccfgg0.cpp | 1 + golded3/gccfgg1.cpp | 14 ++++++++++---- golded3/gcprot.h | 1 + golded3/gecfgg.h | 3 ++- 9 files changed, 31 insertions(+), 8 deletions(-) diff --git a/cfgs/config/advanced.cfg b/cfgs/config/advanced.cfg index a495a76..40925ef 100644 --- a/cfgs/config/advanced.cfg +++ b/cfgs/config/advanced.cfg @@ -126,6 +126,9 @@ AKA 1:23/45.67@fidonet.org AKAMATCHNET YES ; Enable aka matching in netmail. ;AKAMATCHECHO NO ; No aka matching in echomail. ;AKAMATCHLOCAL NO ; No aka matching in local areas. +;AKAMATCHFROMTO NO ; No aka matching using the "To" field + ; (use the "From" field only). + ---------------------------------------------------------------------- -- NODELISTS AND USERLISTS @@ -425,7 +428,7 @@ STATUSLINECLOCK Yes -- MESSAGE EDITOR // Chars to display instead of CR and space in the internal editor. -;EDITCHARPARA '' +;EDITCHARPARA '' ;EDITCHARSPACE · ged+ ;EDITCHARSPACE '·' @@ -613,7 +616,7 @@ QUOTESTRING " FL> " // QUOTEWRAPHARD (yes) // This keyword controls behaviour of quoted text (wrap or reflow). -// QUOTEBUFFILE +// QUOTEBUFFILE // If used, it sets the default filename for the quotebuffer. If no // path is specified, the GOLDPATH is used. // NOTE: If this keyword is used in globally (in GOLDED.CFG), it diff --git a/cfgs/config/advanced.rus b/cfgs/config/advanced.rus index 84e73d2..8407c7c 100644 --- a/cfgs/config/advanced.rus +++ b/cfgs/config/advanced.rus @@ -92,7 +92,10 @@ AKA 2:5063/77@fidonet.org ; AKAMatchNet Yes ; Разрешить в Netmail. AKAMatchEcho No ; Запретить в echomail. (РЕКОМЕНДУЕТСЯ!) AKAMatchLocal Yes ; Разpешить в локальных областях. - +AKAMatchFromTo No ; Выбирать AKA только на основании поля From +;AKAMatchFromTo Yes ; Сначала выбирать AKA на основании поля From, + ; если же нет правила для поля From, тогда + ; выбирать AKA на основании поля To. ---------------------------------------------------------------------- -- НОДЛИСТЫ И СПИСКИ ПОЛЬЗОВАТЕЛЕЙ (USERLISTS) diff --git a/docs/notework.txt b/docs/notework.txt index 2dcff0f..ec99bef 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,12 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ New AKA matching feature: match for "From" field then (if not matched) + match for "To" field. New config token AKAMATCHFROMTO (yes/no). + (Patch from Ianos Gnatiuc 2:5030/830.17) + +- MS Visual C build now contains Goldnode+ (patch from Ianos Gnatiuc). + - Fix man pages. - Fix subshell start message output (bugreport from Semen Panevin). diff --git a/golded3/gccfgg.cpp b/golded3/gccfgg.cpp index de654ef..0360a78 100644 --- a/golded3/gccfgg.cpp +++ b/golded3/gccfgg.cpp @@ -686,6 +686,7 @@ CfgGed::CfgGed() { adeptxbbsuserno = 0; addressbookadd = YES; addresslookupfirst = false; + akamatchfromto = false; areaautoid = AUTOID_LONG; areacopydirect = false; areacopyaddid = false; diff --git a/golded3/gccfgg.h b/golded3/gccfgg.h index 2d9b941..4f69b9a 100644 --- a/golded3/gccfgg.h +++ b/golded3/gccfgg.h @@ -36,6 +36,7 @@ const word CRC_ADEPTXBBSUSERNO = 0x0E98; const word CRC_AKA = 0x13A4; const word CRC_AKAMATCH = 0xF237; const word CRC_AKAMATCHECHO = 0xF0C1; +const word CRC_AKAMATCHFROMTO = 0xD8B9; const word CRC_AKAMATCHING = 0x869A; const word CRC_AKAMATCHLOCAL = 0x4AC4; const word CRC_AKAMATCHNET = 0xFD6E; diff --git a/golded3/gccfgg0.cpp b/golded3/gccfgg0.cpp index f139b85..5bc0c29 100644 --- a/golded3/gccfgg0.cpp +++ b/golded3/gccfgg0.cpp @@ -190,6 +190,7 @@ SwitchA: case CRC_ADEPTXBBSUSERNO : CfgAdeptxbbsuserno (); break; case CRC_AKA : CfgAddress (); break; case CRC_AKAMATCH : CfgAkamatch (); break; + case CRC_AKAMATCHFROMTO : CfgAkamatchfromto (); break; case CRC_AKAMATCHING : CfgAkamatching (); break; case CRC_AREAAUTOID : CfgAreaautoid (); break; case CRC_AREACFMREPLYTO : CfgAreacfmreplyto (); break; diff --git a/golded3/gccfgg1.cpp b/golded3/gccfgg1.cpp index 54d5c3f..3dc6361 100644 --- a/golded3/gccfgg1.cpp +++ b/golded3/gccfgg1.cpp @@ -83,12 +83,12 @@ void CfgAddresslookupfirst(){ else CFG->addresslookupfirst = NO; } - + // ------------------------------------------------------------------ void CfgAddressmacro(char* v) { val = v; CfgAddressmacro(); } void CfgAddressmacro() { - + AddrMacro tmp; tmp.attr.reset(); int subjwasquoted = NO; @@ -175,6 +175,12 @@ void CfgAkamatch() { // ------------------------------------------------------------------ +void CfgAkamatchfromto() { + CFG->akamatchfromto = (0 != GetYesno(val)); +} + +// ------------------------------------------------------------------ + void CfgAkamatching() { if(cfgingroup) { @@ -203,7 +209,7 @@ void CfgAreaautoid() { } // ------------------------------------------------------------------ - + void CfgAreacfmreplyto() { strxcpy(CFG->areacfmreplyto, val, sizeof(Echo)); @@ -400,7 +406,7 @@ void CfgAreapmscanincl() { // ------------------------------------------------------------------ void CfgAreareadonly() { - + if(strieql(val, "Soft")) CFG->areareadonly = READONLY_SOFT; else if(strieql(val, "Hard")) diff --git a/golded3/gcprot.h b/golded3/gcprot.h index 631dc87..dcb09a4 100644 --- a/golded3/gcprot.h +++ b/golded3/gcprot.h @@ -39,6 +39,7 @@ void CfgAdeptxbbspath (); void CfgAdeptxbbsuserno (); void CfgAkamatch (); void CfgAkamatchecho (); +void CfgAkamatchfromto (); void CfgAkamatching (); void CfgAkamatchlocal (); void CfgAkamatchnet (); diff --git a/golded3/gecfgg.h b/golded3/gecfgg.h index 39d1eee..25bd4fd 100644 --- a/golded3/gecfgg.h +++ b/golded3/gecfgg.h @@ -140,6 +140,7 @@ public: int adeptxbbsuserno; std::vector aka; std::vector akamatch; + bool akamatchfromto; int areaautoid; Echo areacfmreplyto; bool areacopydirect; @@ -448,7 +449,7 @@ protected: int hardline; int spellchecker; } cfg; - + // ----------------------------------------------------------------- // String bag