summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--otr/dllmain.cpp11
-rw-r--r--otr/otr.mdsp4
-rw-r--r--otr/otr_private.h2
3 files changed, 14 insertions, 3 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 ) {
diff --git a/otr/otr.mdsp b/otr/otr.mdsp
index 944adf4..f9a0e47 100644
--- a/otr/otr.mdsp
+++ b/otr/otr.mdsp
@@ -123,7 +123,6 @@ extraResourceOptions=
24=libotr\src\version.h
[History]
..\..\include\m_icolib.h,0
-dllmain.cpp,41476
utils.cpp,7128
common.h,2043
libotr\src\context.h,6666
@@ -132,4 +131,5 @@ libotr\src\message.h,6083
libotr\src\proto.h,5014
libotr\src\userstate.h,1038
libotr\src\message.c,36329
-otr_private.h,634
+otr_private.h,149
+dllmain.cpp,43274
diff --git a/otr/otr_private.h b/otr/otr_private.h
index 5c3f1bd..d1a464f 100644
--- a/otr/otr_private.h
+++ b/otr/otr_private.h
@@ -5,7 +5,7 @@
#define VER_MAJOR 0
#define VER_MINOR 5
#define VER_RELEASE 1
-#define VER_BUILD 2
+#define VER_BUILD 3
#define __STRINGIZE(x) #x
#define VER_STRING __STRINGIZE( VER_MAJOR.VER_MINOR.VER_RELEASE.VER_BUILD )