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 /otr/dllmain.cpp | |
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
Diffstat (limited to 'otr/dllmain.cpp')
-rw-r--r-- | otr/dllmain.cpp | 11 |
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 ) {
|