From 9db1f26785b166bfce01b265b7703fcda5b8b799 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Sat, 26 Oct 2002 19:49:36 +0000 Subject: [PATCH] Some fixes on replying to gate --- docs/notework.txt | 3 +++ golded3/gehdre.cpp | 16 ++++++++++++++-- golded3/gepost.cpp | 24 ++++++++---------------- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 01ea543..a0c3d33 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,9 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ +- Some fixes for replying through the gate. If someone use + "INTERNETREPLY NO" please report if it get broken with this changes. + ! AREALISTGROUPORDER now supports #num format entries. ! You can now use area groups in the *SCAN* keywords: just prepend the diff --git a/golded3/gehdre.cpp b/golded3/gehdre.cpp index af9e2d8..14dbe5a 100644 --- a/golded3/gehdre.cpp +++ b/golded3/gehdre.cpp @@ -365,7 +365,10 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view, bool doedithdr) { to_addr = msg->idest; } else { - to_name = (*msg->iaddr and not *msg->igate) ? msg->iaddr : msg->to; + if(AA->isnet()) + to_name = (*msg->iaddr and not *msg->igate) ? msg->iaddr : msg->to; + else + to_name = msg->to; if(msg->dest.valid()) msg->dest.make_string(to_addr, msg->ddom); } @@ -490,7 +493,7 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view, bool doedithdr) { strcpy(msg->iaddr, to_name.c_str()); } else { - if(to_name.length() > 34) { + if(to_name.length() >= sizeof(Name)) { strcpy(msg->to, "UUCP"); strcpy(msg->iaddr, to_name.c_str()); } @@ -503,6 +506,15 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view, bool doedithdr) { else strcpy(msg->to, to_name.c_str()); + if(not CFG->switches.get(internetreply)) { + if(*msg->iaddr and (strlen(msg->iaddr) < sizeof(Name))) { + if(not *msg->realto) + strcpy(msg->to, msg->realto); + strcpy(msg->to, msg->iaddr); + *msg->iaddr = NUL; + } + } + if(*msg->iaddr) { if(not (CFG->internetgateexp == RFCAddress) and *msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not isuucp(msg->To())) { Name name; diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index 5492025..330ccf3 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -927,24 +927,16 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { throw_free(msg->inreplyto); msg->inreplyto = throw_strdup(omsg->messageid); } - if(CFG->switches.get(internetreply) or (*omsg->iaddr and (strlen(omsg->iaddr) >= sizeof(Name)))) { - strcpy(msg->iaddr, omsg->iaddr); - strcpy(msg->igate, omsg->igate); - if(*msg->igate) { - msg->dest.set(msg->igate); - char* ptr = strchr(msg->igate, ' '); - if(ptr) { - if(not isuucp(msg->to)) - strcpy(msg->realto, msg->to); - strcpy(msg->to, strskip_wht(ptr)); - } + strcpy(msg->igate, omsg->igate); + if(*msg->igate) { + msg->dest.set(msg->igate); + char* ptr = strchr(msg->igate, ' '); + if(ptr) { + if(not isuucp(msg->to)) + strcpy(msg->realto, msg->to); + strcpy(msg->to, strskip_wht(ptr)); } } - else if(not AA->isinternet() and *omsg->iaddr and (strlen(omsg->iaddr) < sizeof(Name))) { - if(not isuucp(msg->to)) - strcpy(msg->realto, msg->to); - strcpy(msg->to, omsg->iaddr); - } } else { int reflen = omsg->references ? strlen(omsg->references) : 0;