diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-09-28 18:15:02 +0300 |
commit | 353c79463614e291eb37e629e8b0d1cb9c58d8e8 (patch) | |
tree | c4a3a921bf8f0411933485d8c7fde446b1b8d305 /messages.cpp | |
parent | 4f8f8d3b1691decd02ba93ca7799c46cff1c4f9b (diff) |
code cleanup
Diffstat (limited to 'messages.cpp')
-rw-r--r-- | messages.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/messages.cpp b/messages.cpp index 369354c..283f4be 100644 --- a/messages.cpp +++ b/messages.cpp @@ -17,32 +17,6 @@ #include "commonheaders.h" -wstring new_key; -HANDLE new_key_hcnt = NULL; -HANDLE new_key_hcnt_mutex = NULL; -bool _terminate = false; - -BOOL isProtoMetaContacts(HANDLE hContact); - -int RecvMsgSvc(WPARAM w, LPARAM l) -{ - CCSDATA *ccs = (CCSDATA*)l; - if (!ccs) - return CallService(MS_PROTO_CHAINRECV, w, l); - PROTORECVEVENT *pre = (PROTORECVEVENT*)(ccs->lParam); - if (!pre) - return CallService(MS_PROTO_CHAINRECV, w, l); - char *msg = pre->szMessage; - if (!msg) - return CallService(MS_PROTO_CHAINRECV, w, l); - HANDLE hContact = ccs->hContact; - if(isProtoMetaContacts(hContact)) - hContact = metaGetMostOnline(hContact); - - - return CallService(MS_PROTO_CHAINRECV, w, l); -} - char *send_msg = NULL; int SendMsgSvc(WPARAM w, LPARAM l) @@ -132,39 +106,6 @@ int SendMsgSvc(WPARAM w, LPARAM l) return CallService(MS_PROTO_CHAINSEND, w, l); } -int HookSendMsg(WPARAM w, LPARAM l) -{ - HANDLE hContact = (HANDLE)w; - if(isProtoMetaContacts(hContact)) - hContact = metaGetMostOnline(hContact); - if(!DBGetContactSettingByte(hContact, szReplacerModuleName, "GPGEncryption", 0)) - return 0; - - if(bAppendTags) - { - if(!l) - return 0; - BYTE Msgs = DBGetContactSettingByte(hContact, szReplacerModuleName, "MsgsForTagging", 0); - if(!Msgs) - return 0; - DBEVENTINFO * dbei = (DBEVENTINFO*)l; - if((dbei->eventType == EVENTTYPE_MESSAGE) && (dbei->flags & DBEF_SENT)) - { - char *msg = (char*)dbei->pBlob; - TCHAR *tmp = mir_utf8decodeW(msg); - wstring str = tmp; - mir_free(tmp); - str.insert(0, outopentag); - str.append(outclosetag); - char *msg2 = mir_utf8encodeW(str.c_str()); - mir_free(dbei->pBlob); - dbei->pBlob = (PBYTE)msg2; - dbei->cbBlob = strlen(msg2)+1; - DBWriteContactSettingByte(hContact, szReplacerModuleName, "MsgsForTagging", Msgs - 1); - } - } - return 0; -} |