From d385efebe356aebb92376fcd9c796a636df4be9a Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 20 Aug 2010 11:45:24 +0300 Subject: modified: init.cpp modified: messages.cpp modified: new_gpg.rc modified: options.cpp modified: resource.h modified: utilities.cpp --- messages.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index f523778..eeea14b 100644 --- a/messages.cpp +++ b/messages.cpp @@ -51,8 +51,8 @@ int RecvMsgSvc(WPARAM w, LPARAM l) } if((s2 != wstring::npos) && (s1 != wstring::npos)) { //this is public key - if(!DBGetContactSettingByte(ccs->hContact, szGPGModuleName, "GPGEncryption", 0)) - ;// +/* if(!DBGetContactSettingByte(ccs->hContact, szGPGModuleName, "GPGEncryption", 0)) + ; */ void ShowNewKeyDialog(); s1 = 0; while((s1 = str.find(_T("\r"), s1)) != wstring::npos) @@ -247,16 +247,18 @@ int SendMsgSvc(WPARAM w, LPARAM l) DWORD code; wstring cmd; wstring path; + extern bool bJabberAPI; char *tmp = UniGetContactSettingUtf(ccs->hContact, szGPGModuleName, "KeyID", ""); if(strlen(tmp) < 2) { mir_free(tmp); return CallService(MS_PROTO_CHAINSEND, w, l); } -// cmd += _T("--comment \"\" --no-version "); + if(!bJabberAPI) + cmd += _T("--comment \"\" --no-version "); if(DBGetContactSettingByte(ccs->hContact, szGPGModuleName, "bAlwaysTrust", 0)) cmd += _T("--trust-model always "); - cmd += _T("--comment \"\" --no-version --batch --yes -e -a -r "); + cmd += _T("--batch --yes -e -a -r "); TCHAR *tmp2 = mir_a2t(tmp); mir_free(tmp); cmd += tmp2; @@ -310,7 +312,10 @@ int SendMsgSvc(WPARAM w, LPARAM l) TCHAR tmp[128]; f.getline(tmp, 128); str.append(tmp); - str.append(_T("\n")); + if(bJabberAPI) + str.append(_T("\n")); + else + str.append(_T("\r\n")); } f.close(); DeleteFile(path.c_str()); -- cgit v1.2.3