diff --git a/golded3/gepost.cpp b/golded3/gepost.cpp index 567c5ae..c4a162e 100644 --- a/golded3/gepost.cpp +++ b/golded3/gepost.cpp @@ -874,6 +874,10 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) { // ... but only if we did NOT change aka manually if(AA->Aka().addr.equals(AA->aka())) { Addr aka_addr = AA->Aka().addr; + if (CFG->akamatchfromto) + aka_addr = omsg->dest; + else + aka_addr = AA->Aka().addr; AkaMatch(&aka_addr, &omsg->orig); AA->SetAka(aka_addr); } diff --git a/golded3/geutil2.cpp b/golded3/geutil2.cpp index 1d34721..04096b2 100644 --- a/golded3/geutil2.cpp +++ b/golded3/geutil2.cpp @@ -67,7 +67,7 @@ bool edit_pathname(char* buf, int buf_size, char* title, int helpcat) { if(not edit_string(buf, buf_size, title, helpcat)) return false; - + std::vector::iterator z; for(z = CFG->filealias.begin(); z != CFG->filealias.end(); z++) { if(strieql(buf, z->alias)) { @@ -119,7 +119,7 @@ bool PopupLocked(long tries, int isopen, const char* file) { usleep(1000); #else sleep(1); -#endif +#endif // Try again return true; } @@ -214,7 +214,12 @@ int AkaMatch(ftn_addr* match, const ftn_addr* addr) { for(a = CFG->aka.begin(), aka = 0; a != CFG->aka.end(); aka++, a++) { if(match->equals(a->addr)) - matchaka = aka; + { + if (CFG->akamatchfromto) + return aka; + else + matchaka = aka; + } // Ignore fakenet addresses if(a->addr.net != a->pointnet) {