From 365d949d8ec2712fbdec479e73e78cbbe80b3399 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 18 May 2012 22:28:05 +0300 Subject: fixed (#33 Settings) --- messages.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index fc52aea..74d0c44 100755 --- a/messages.cpp +++ b/messages.cpp @@ -545,7 +545,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) HistoryLog(ccs->hContact, db_event(msg, 0, 0, dbflags)); return 0; } - if(bAutoExchange && strstr(msg, "-----PGP KEY REQUEST-----") && isGPGConfigured()) + if(bAutoExchange && strstr(msg, "-----PGP KEY REQUEST-----") && gpg_valid && gpg_keyexist) { char *tmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "GPGPubKey", ""); if(tmp[0]) @@ -557,7 +557,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) DBWriteContactSettingByte(ccs->hContact, szGPGModuleName, "GPGEncryption", 1); } mir_free(tmp); - if(!isContactHaveKey(ccs->hContact) && bAutoExchange && isGPGConfigured()) + if(!isContactHaveKey(ccs->hContact) && bAutoExchange && gpg_valid && gpg_keyexist) { LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0); DWORD uin = DBGetContactSettingDword(ccs->hContact, proto, "UIN", 0); @@ -802,7 +802,7 @@ int SendMsgSvc(WPARAM w, LPARAM l) return CallService(MS_PROTO_CHAINSEND, w, l); if(!isContactHaveKey(ccs->hContact)) { - if(bAutoExchange && !strstr(msg, "-----PGP KEY REQUEST-----") && !strstr(msg, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && isGPGConfigured()) + if(bAutoExchange && !strstr(msg, "-----PGP KEY REQUEST-----") && !strstr(msg, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && gpg_valid) { void send_encrypted_msgs_thread(HANDLE hContact); LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0); -- cgit v1.2.3