diff options
Diffstat (limited to 'MySpace/srmm_icon.cpp')
-rw-r--r-- | MySpace/srmm_icon.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/MySpace/srmm_icon.cpp b/MySpace/srmm_icon.cpp index 4aaa78f..6283237 100644 --- a/MySpace/srmm_icon.cpp +++ b/MySpace/srmm_icon.cpp @@ -11,17 +11,18 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) { if(wd->uType != MSG_WINDOW_EVT_OPEN) return 0;
HANDLE hContact = wd->hContact, hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- //if(!hSub) return 0;
-
+
bool hide = false;
- if((hSub == 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULE)) || (hSub != 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hSub, (LPARAM)MODULE)))
+ if((hSub == 0 && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULE)) || (hSub && !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hSub, (LPARAM)MODULE)))
hide = true;
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
- sid.szModule = MODULE;
- sid.flags = (hide ? MBF_HIDDEN : 0);
- CallService(MS_MSG_MODIFYICON, (WPARAM)wd->hContact, (LPARAM)&sid);
+ if(hSub || !hide) { // avoid writing db param for non-myspace and non-meta contacts
+ StatusIconData sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.szModule = MODULE;
+ sid.flags = (hide ? MBF_HIDDEN : 0);
+ CallService(MS_MSG_MODIFYICON, (WPARAM)wd->hContact, (LPARAM)&sid);
+ }
return 0;
}
|