summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'messages.cpp')
-rwxr-xr-xmessages.cpp6
1 files changed, 3 insertions, 3 deletions
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);