diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2015-08-10 03:41:45 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2015-08-10 03:41:45 +0000 |
commit | f3e66561e402280f6549aef2341217f2d09af214 (patch) | |
tree | 2b0e9d33035bc9d43c25a7d192db24f693d28bc9 /plugins | |
parent | 623da26184c4e642d5a2bcee09091ff412aea7d4 (diff) |
new_gpg:
switched to new outgoing message filtering api (fix for outgoing tags problem)
git-svn-id: http://svn.miranda-ng.org/main/trunk@14891 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rwxr-xr-x[-rw-r--r--] | plugins/New_GPG/src/init.cpp | 3 | ||||
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index 2e30326e0f..b238e954a3 100644..100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -142,7 +142,8 @@ static int OnModulesLoaded(WPARAM, LPARAM) GetJabberInterface(0,0);
HookEvent(ME_OPT_INITIALISE, GpgOptInit);
- HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg);
+ //HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg);
+ HookEvent(ME_MSG_PRECREATEEVENT, 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 3890e57e45..e80bc328ee 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -791,10 +791,13 @@ int HookSendMsg(WPARAM w, LPARAM l) { if(!l) return 0; - DBEVENTINFO * dbei = (DBEVENTINFO*)l; + MessageWindowEvent *ev = (MessageWindowEvent*)l; + DBEVENTINFO * dbei = ev->dbei; + if(!dbei) + return 0; if(dbei->eventType != EVENTTYPE_MESSAGE) return 0; - MCONTACT hContact = (MCONTACT)w; + MCONTACT hContact = ev->hContact; 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. |