summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-11 18:13:35 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-11 18:13:35 +0000
commit7eead4e8929a8cacffa457a998800f63497aca4f (patch)
tree8a2d91c5761fc4d25f1a99e8399f614e4ab91cd1 /plugins/New_GPG/src
parenta4d548ce78c5d9405c94d4ed33ab07c0750f9ae3 (diff)
New_GPG: [14891] reverted
git-svn-id: http://svn.miranda-ng.org/main/trunk@14916 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src')
-rw-r--r--[-rwxr-xr-x]plugins/New_GPG/src/init.cpp3
-rwxr-xr-xplugins/New_GPG/src/messages.cpp7
2 files changed, 3 insertions, 7 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index b238e954a3..2e30326e0f 100755..100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -142,8 +142,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
GetJabberInterface(0,0);
HookEvent(ME_OPT_INITIALISE, GpgOptInit);
- //HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg);
- HookEvent(ME_MSG_PRECREATEEVENT, HookSendMsg);
+ HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg);
if(bJabberAPI && bIsMiranda09)
HookEvent(ME_PROTO_ACCLISTCHANGED, GetJabberInterface);
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index e80bc328ee..3890e57e45 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -791,13 +791,10 @@ int HookSendMsg(WPARAM w, LPARAM l)
{
if(!l)
return 0;
- MessageWindowEvent *ev = (MessageWindowEvent*)l;
- DBEVENTINFO * dbei = ev->dbei;
- if(!dbei)
- return 0;
+ DBEVENTINFO * dbei = (DBEVENTINFO*)l;
if(dbei->eventType != EVENTTYPE_MESSAGE)
return 0;
- MCONTACT hContact = ev->hContact;
+ MCONTACT hContact = (MCONTACT)w;
if(dbei->flags & DBEF_SENT)
{
if(isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.t.c.