summaryrefslogtreecommitdiff
path: root/otr/dllmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'otr/dllmain.cpp')
-rw-r--r--otr/dllmain.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp
index 7780324..7b67140 100644
--- a/otr/dllmain.cpp
+++ b/otr/dllmain.cpp
@@ -703,6 +703,7 @@ int OTRSendMessageW(WPARAM wParam, LPARAM lParam){
*/
int RecvMessage(WPARAM wParam,LPARAM lParam){
+ //PUShowMessage("OTR Recv Message", SM_NOTIFY);
CCSDATA *ccs = (CCSDATA *) lParam;
PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
@@ -1210,6 +1211,16 @@ extern "C" DLLIMPORT int Load(PLUGINLINK *link) {
pd.type = PROTOTYPE_ENCRYPTION;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
+ // remove us as a filter to all contacts - fix filter type problem
+ if(DBGetContactSettingByte(0, MODULE, "FilterOrderFix", 0) != 2) {
+ HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ while ( hContact != NULL ) {
+ CallService( MS_PROTO_REMOVEFROMCONTACT, ( WPARAM )hContact, ( LPARAM )MODULE );
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
+ }
+ DBWriteContactSettingByte(0, MODULE, "FilterOrderFix", 2);
+ }
+
// add us as a filter to all contacts
HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {