diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-05-08 15:10:59 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-05-08 15:10:59 +0000 |
commit | 634b8c24ce27d4ceed8eb4bc726de97dba1c6f3a (patch) | |
tree | 999d9434e94294b05625c23206a6cab332bfe4de | |
parent | 58b7288043d709f7a5b762ac9699877f9477bdc2 (diff) |
added code to fix filter order problem introduced in earlier versions
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@170 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | otr/dllmain.cpp | 11 | ||||
-rw-r--r-- | otr/otr.mdsp | 4 | ||||
-rw-r--r-- | otr/otr_private.h | 2 |
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 )
|