diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-11-19 23:28:06 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-11-19 23:28:06 +0000 |
commit | 3722709997f540d24f802a2766018a5d0a0f9f47 (patch) | |
tree | e3c605ef4c4acfe827aded050a8ceabcc7ba8bf1 | |
parent | d926369611fbf2dc975e0080cbd60cfa111c7d11 (diff) |
ignore subcontact online notifications
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@381 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | meta2/common.h | 1 | ||||
-rw-r--r-- | meta2/core_functions.cpp | 4 | ||||
-rw-r--r-- | meta2/proto.cpp | 6 | ||||
-rw-r--r-- | meta2/version.h | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/meta2/common.h b/meta2/common.h index f2e9b74..582643c 100644 --- a/meta2/common.h +++ b/meta2/common.h @@ -46,6 +46,7 @@ #include <m_icolib.h>
#include <m_skin.h>
#include <m_utils.h>
+#include <m_ignore.h>
#include <m_metacontacts.h>
#include <m_yapp.h>
diff --git a/meta2/core_functions.cpp b/meta2/core_functions.cpp index 8b27bbf..1b47bd5 100644 --- a/meta2/core_functions.cpp +++ b/meta2/core_functions.cpp @@ -143,6 +143,8 @@ void Meta_Assign(HANDLE hSub, HANDLE hMeta) { } else // shouldn't happen, as the menu option is hidden when metas are disabled...
DBWriteContactSettingByte(hMeta, "CList", "Hidden", 1);
+ CallService(MS_IGNORE_IGNORE, (WPARAM)hSub, (WPARAM)IGNOREEVENT_USERONLINE);
+
DBVARIANT dbv;
if(DBGetContactSettingUTF8String(hMeta, "CList", "MyHandle", &dbv)) {
if(!DBGetContactSettingUTF8String(hSub, "CList", "MyHandle", &dbv)) {
@@ -175,6 +177,8 @@ void Meta_Remove(HANDLE hSub) { DBWriteContactSettingByte(hSub, MODULE, "IsSubcontact", 0);
if(!meta_group_hack_disabled) DBWriteContactSettingByte(hSub, "CList", "Hidden", 0);
+ CallService(MS_IGNORE_UNIGNORE, (WPARAM)hSub, (WPARAM)IGNOREEVENT_USERONLINE);
+
metaMap[hMeta].remove(hSub);
if(metaMap[hMeta].size() == 0) {
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMeta, 0);
diff --git a/meta2/proto.cpp b/meta2/proto.cpp index ad6571c..a147bc6 100644 --- a/meta2/proto.cpp +++ b/meta2/proto.cpp @@ -333,9 +333,9 @@ int SendNudge(WPARAM wParam,LPARAM lParam) int ContactDeleted(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
- if(IsSubcontact(hContact))
+ if(IsSubcontact(hContact)) {
Meta_Remove(hContact);
- else if(IsMetacontact(hContact)) {
+ } else if(IsMetacontact(hContact)) {
SubcontactList::Iterator i = metaMap[hContact].start();
HANDLE hSub;
while(i.has_val()) {
@@ -348,6 +348,8 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) { DBWriteContactSettingByte(hSub, MODULE, "IsSubcontact", 0);
if(!meta_group_hack_disabled) DBWriteContactSettingByte(hSub, "CList", "Hidden", 0);
+ CallService(MS_IGNORE_UNIGNORE, (WPARAM)hSub, (WPARAM)IGNOREEVENT_USERONLINE);
+
i.next();
}
metaMap.remove(hContact);
diff --git a/meta2/version.h b/meta2/version.h index 7caeead..78dac87 100644 --- a/meta2/version.h +++ b/meta2/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 0
-#define __BUILD_NUM 13
+#define __BUILD_NUM 14
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|