summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_svcs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-09 16:56:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-09 16:56:30 +0000
commit7963b60b9f1bcd478f537f57abde51204c97eb90 (patch)
treed0e892316468ea91d4a87f9ea815ce7224737397 /protocols/MRA/src/Mra_svcs.cpp
parentf6233a8261525da7c1a7ee52afd46d1980275a40 (diff)
- fixed regression with passive contact addition;
- fixed "Bad date sent" git-svn-id: http://svn.miranda-ng.org/main/trunk@6032 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_svcs.cpp')
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 670a8ae86f..33c7084157 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -486,6 +486,22 @@ int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam)
MraMoveContactToGroup(hContact, dwGroupID, wszGroup);
}
}
+ // NotOnList setting. Has a temporary contact just been added permanently?
+ else if ( !strcmp(cws->szSetting, "NotOnList")) {
+ if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) {
+ CMStringW wszAuthMessage;
+ if ( !mraGetStringW(NULL, "AuthMessage", wszAuthMessage))
+ wszAuthMessage = TranslateW(MRA_DEFAULT_AUTH_MESSAGE);
+
+ db_unset(hContact, "CList", "Hidden");
+
+ CMStringA szEmail, szPhones;
+ CMStringW wszNick;
+ DWORD dwGroupID, dwContactFlag;
+ GetContactBasicInfoW(hContact, NULL, &dwGroupID, &dwContactFlag, NULL, NULL, &szEmail, &wszNick, &szPhones);
+ MraAddContact(hContact, dwContactFlag, dwGroupID, szEmail, wszNick, &szPhones, &wszAuthMessage);
+ }
+ }
// Hidden setting
else if ( !strcmp(cws->szSetting, "Hidden")) {
DWORD dwContactFlag = GetContactFlags(hContact);