From 093731d35e605ede9798ace4ac73c77a51012a6c Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 20 May 2012 07:24:29 +0300 Subject: metacontacts fixes --- messages.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'messages.cpp') 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)) { -- cgit v1.2.3