From 3a457e91d83d929856305a70448e8c4c87ea0179 Mon Sep 17 00:00:00 2001 From: sje Date: Wed, 3 Oct 2007 05:28:12 +0000 Subject: fixed mem leak in options added send offline to caps added option to ignore notifications (via db edit) remove duplicate zap events (done by new metas internally) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@339 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/notifications.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'MySpace/notifications.cpp') diff --git a/MySpace/notifications.cpp b/MySpace/notifications.cpp index 8c2e989..d1f196c 100644 --- a/MySpace/notifications.cpp +++ b/MySpace/notifications.cpp @@ -77,6 +77,7 @@ LRESULT CALLBACK NotifyPopupWindowProc( HWND hWnd, UINT message, WPARAM wParam, void NotifyMail() { if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndMailPopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyMail", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -114,9 +115,9 @@ void NotifyMail() { void NotifyBlogComment() { - if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndBlogPopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyBlogComment", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -153,9 +154,9 @@ void NotifyBlogComment() { } void NotifyProfileComment() { - if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndProfilePopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyProfileComment", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -196,6 +197,7 @@ void NotifyProfileComment() { void NotifyFriendRequest() { if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndFriendPopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyFriendRequest", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -274,6 +276,7 @@ void NotifyPictureComment() { void NotifyBlogSubscriptPost() { if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndBlogSubPopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyBlogSubscription", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -312,6 +315,7 @@ void NotifyBlogSubscriptPost() { void NotifyUnknown(char *name, char *value) { if (!ServiceExists( MS_POPUP_ADDPOPUPT)) return; if(bWndUnknownPopup) return; + if(!DBGetContactSettingByte(0, MODULE, "NotifyUnknown", 1)) return; POPUPDATAT ppd = {0}; TCHAR wproto[256]; @@ -401,9 +405,12 @@ void NotifyZapSend(HANDLE hContact, int zap_num) { dbe.cbBlob = strlen(rmsg) + 1; CallService(MS_DB_EVENT_ADD,(WPARAM)hContact,(LPARAM)&dbe); + /* + // not required for new metas HANDLE hMeta; if(ServiceExists(MS_MC_GETMETACONTACT) && (hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0)) != 0) // add to metacontact too CallService(MS_DB_EVENT_ADD,(WPARAM)hMeta,(LPARAM)&dbe); + */ char zap_sound_name[512]; mir_snprintf(zap_sound_name, 512, "%s/Zap/%s", MODULE, zap_array[zap_num]); -- cgit v1.2.3