summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-20 07:24:29 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-05-20 07:24:29 +0300
commit093731d35e605ede9798ace4ac73c77a51012a6c (patch)
tree7c62c1e06a031f89d87d4f76931de5c77585a77e /messages.cpp
parent9026615fea720ca69d3a3480a69e32e5432db69b (diff)
metacontacts fixes
Diffstat (limited to 'messages.cpp')
-rwxr-xr-xmessages.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/messages.cpp b/messages.cpp
index 6e69a2a..db4e404 100755
--- a/messages.cpp
+++ b/messages.cpp
@@ -54,13 +54,13 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags, D
}
else
{
- DBWriteContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 1);
+ DBWriteContactSettingByte(metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact, szGPGModuleName, "GPGEncryption", 1);
setSrmmIcon(hContact);
setClistIcon(hContact);
}
if(isContactHaveKey(hContact))
{
- DBWriteContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 1);
+ DBWriteContactSettingByte(metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact, szGPGModuleName, "GPGEncryption", 1);
setSrmmIcon(hContact);
setClistIcon(hContact);
}
@@ -99,7 +99,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags, D
wstring cmd;
cmd += _T("--batch ");
{
- char *inkeyid = UniGetContactSettingUtf(metaGetMostOnline(hContact), szGPGModuleName, "InKeyID", "");
+ char *inkeyid = UniGetContactSettingUtf(metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact, szGPGModuleName, "InKeyID", "");
TCHAR *pass = NULL;
if(inkeyid[0])
{
@@ -195,7 +195,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags, D
s = out.find(" ID ", s);
s += strlen(" ID ");
string::size_type s2 = out.find(",",s);
- DBWriteContactSettingString(metaGetMostOnline(hContact), szGPGModuleName, "InKeyID", out.substr(s, s2-s).c_str());
+ DBWriteContactSettingString(metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact, szGPGModuleName, "InKeyID", out.substr(s, s2-s).c_str());
}
void ShowLoadKeyPasswordWindow();
new_key_hcnt_mutex.lock();
@@ -352,7 +352,7 @@ int RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags, D
}
}
}
- if(DBGetContactSettingByte(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 0))
+ if(DBGetContactSettingByte(metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact, szGPGModuleName, "GPGEncryption", 0))
{
if(metaIsSubcontact(hContact))
{