From fc6b9e74816401ad364ff0e675767a30c84d9896 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 8 Oct 2010 10:12:07 +0300 Subject: added ability to remove conflicting filters --- utilities.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'utilities.cpp') diff --git a/utilities.cpp b/utilities.cpp index 2ad4cf2..70bb870 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -755,3 +755,16 @@ const bool StriStr(const char *str, const char *substr) return i; } + +void SecureIM_cleanup() +{ + for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0)) + { + if(CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)"SecureIM")) + CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)"SecureIM"); + if(CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)"OTR")) + CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)"OTR"); + if(CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)"GnuPGPlugin")) + CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)"GnuPGPlugin"); + } +} \ No newline at end of file -- cgit v1.2.3