New feature: AKAMATCHFROMTO
This commit is contained in:
parent
5d0bf484fc
commit
eb75fd337c
@ -874,6 +874,10 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
|||||||
// ... but only if we did NOT change aka manually
|
// ... but only if we did NOT change aka manually
|
||||||
if(AA->Aka().addr.equals(AA->aka())) {
|
if(AA->Aka().addr.equals(AA->aka())) {
|
||||||
Addr aka_addr = AA->Aka().addr;
|
Addr aka_addr = AA->Aka().addr;
|
||||||
|
if (CFG->akamatchfromto)
|
||||||
|
aka_addr = omsg->dest;
|
||||||
|
else
|
||||||
|
aka_addr = AA->Aka().addr;
|
||||||
AkaMatch(&aka_addr, &omsg->orig);
|
AkaMatch(&aka_addr, &omsg->orig);
|
||||||
AA->SetAka(aka_addr);
|
AA->SetAka(aka_addr);
|
||||||
}
|
}
|
||||||
|
@ -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))
|
if(not edit_string(buf, buf_size, title, helpcat))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::vector<FileAlias>::iterator z;
|
std::vector<FileAlias>::iterator z;
|
||||||
for(z = CFG->filealias.begin(); z != CFG->filealias.end(); z++) {
|
for(z = CFG->filealias.begin(); z != CFG->filealias.end(); z++) {
|
||||||
if(strieql(buf, z->alias)) {
|
if(strieql(buf, z->alias)) {
|
||||||
@ -119,7 +119,7 @@ bool PopupLocked(long tries, int isopen, const char* file) {
|
|||||||
usleep(1000);
|
usleep(1000);
|
||||||
#else
|
#else
|
||||||
sleep(1);
|
sleep(1);
|
||||||
#endif
|
#endif
|
||||||
// Try again
|
// Try again
|
||||||
return true;
|
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++) {
|
for(a = CFG->aka.begin(), aka = 0; a != CFG->aka.end(); aka++, a++) {
|
||||||
|
|
||||||
if(match->equals(a->addr))
|
if(match->equals(a->addr))
|
||||||
matchaka = aka;
|
{
|
||||||
|
if (CFG->akamatchfromto)
|
||||||
|
return aka;
|
||||||
|
else
|
||||||
|
matchaka = aka;
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore fakenet addresses
|
// Ignore fakenet addresses
|
||||||
if(a->addr.net != a->pointnet) {
|
if(a->addr.net != a->pointnet) {
|
||||||
|
Reference in New Issue
Block a user