Do not add addressmacros to addressbook
This commit is contained in:
parent
4be936900b
commit
016299ce9b
@ -12,6 +12,9 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
! GoldED+ will no longer add new entry to addressbook if it is an
|
||||
addressmacro.
|
||||
|
||||
! Updated uulib to the latest version. Few bugs fixed. Unordered
|
||||
UU encode now should be processed more accurately than with original
|
||||
library.
|
||||
|
@ -777,6 +777,35 @@ void guserbase::update_addressbook(GMsg* msg, bool reverse, bool force) {
|
||||
if(nlname and strieql(nlname, name))
|
||||
return;
|
||||
|
||||
// 9. It is an addressmacro
|
||||
if(not CFG->addressmacro.empty()) {
|
||||
std::vector<AddrMacro>::iterator n;
|
||||
for(n=CFG->addressmacro.begin(); n != CFG->addressmacro.end(); n++) {
|
||||
if(strieql(name, n->name) or strieql(n->name, iaddr))
|
||||
return;
|
||||
if(iaddr[0] != NUL) {
|
||||
INam buf, buf1, buf2;
|
||||
char *ptr;
|
||||
|
||||
if(n->name[0] == '@') {
|
||||
strcpy(buf, n->name+1);
|
||||
// UUCP/INTERNET addressing
|
||||
ptr = strchr(buf, '/');
|
||||
if(ptr) {
|
||||
*ptr++ = NUL;
|
||||
if(strieql(name, buf))
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(AA->isinternet()) {
|
||||
ptr = n->name;
|
||||
}
|
||||
ParseInternetAddr(ptr, buf1, buf2);
|
||||
if(strieql(iaddr, buf2) or strieql(name, buf1))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ok, let's add it...
|
||||
|
Reference in New Issue
Block a user