summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-20 11:45:24 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-20 11:45:24 +0300
commitd385efebe356aebb92376fcd9c796a636df4be9a (patch)
tree2f2c00fa6491053b1b44ba7bb96b173cb5beec7b /messages.cpp
parent73e1f8787147ec66e9a56117cedf8e797dc7ecc6 (diff)
modified: init.cpp
modified: messages.cpp modified: new_gpg.rc modified: options.cpp modified: resource.h modified: utilities.cpp
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp15
1 files changed, 10 insertions, 5 deletions
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());