Some fixes on replying to gate

This commit is contained in:
Alexander S. Aganichev 2002-10-26 19:49:36 +00:00
parent 5c40b1a909
commit 9db1f26785
3 changed files with 25 additions and 18 deletions

View File

@ -12,6 +12,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ 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. ! AREALISTGROUPORDER now supports #num format entries.
! You can now use area groups in the *SCAN* keywords: just prepend the ! You can now use area groups in the *SCAN* keywords: just prepend the

View File

@ -365,7 +365,10 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view, bool doedithdr) {
to_addr = msg->idest; to_addr = msg->idest;
} }
else { 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()) if(msg->dest.valid())
msg->dest.make_string(to_addr, msg->ddom); 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()); strcpy(msg->iaddr, to_name.c_str());
} }
else { else {
if(to_name.length() > 34) { if(to_name.length() >= sizeof(Name)) {
strcpy(msg->to, "UUCP"); strcpy(msg->to, "UUCP");
strcpy(msg->iaddr, to_name.c_str()); strcpy(msg->iaddr, to_name.c_str());
} }
@ -503,6 +506,15 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view, bool doedithdr) {
else else
strcpy(msg->to, to_name.c_str()); 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(*msg->iaddr) {
if(not (CFG->internetgateexp == RFCAddress) and *msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not isuucp(msg->To())) { if(not (CFG->internetgateexp == RFCAddress) and *msg->To() and (strpbrk(msg->iaddr, "<>()\"") == NULL) and not isuucp(msg->To())) {
Name name; Name name;

View File

@ -927,24 +927,16 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
throw_free(msg->inreplyto); throw_free(msg->inreplyto);
msg->inreplyto = throw_strdup(omsg->messageid); msg->inreplyto = throw_strdup(omsg->messageid);
} }
if(CFG->switches.get(internetreply) or (*omsg->iaddr and (strlen(omsg->iaddr) >= sizeof(Name)))) { strcpy(msg->igate, omsg->igate);
strcpy(msg->iaddr, omsg->iaddr); if(*msg->igate) {
strcpy(msg->igate, omsg->igate); msg->dest.set(msg->igate);
if(*msg->igate) { char* ptr = strchr(msg->igate, ' ');
msg->dest.set(msg->igate); if(ptr) {
char* ptr = strchr(msg->igate, ' '); if(not isuucp(msg->to))
if(ptr) { strcpy(msg->realto, msg->to);
if(not isuucp(msg->to)) strcpy(msg->to, strskip_wht(ptr));
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 { else {
int reflen = omsg->references ? strlen(omsg->references) : 0; int reflen = omsg->references ? strlen(omsg->references) : 0;