From 8cdda41b119526a2741938d57b7e066e1697315b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 1 Apr 2011 02:20:17 +0300 Subject: hm )) --- metacontacts.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'metacontacts.cpp') diff --git a/metacontacts.cpp b/metacontacts.cpp index 8e282c6..46185e4 100644 --- a/metacontacts.cpp +++ b/metacontacts.cpp @@ -42,7 +42,8 @@ bool metaIsDefaultSubContact(HANDLE hContact) HANDLE metaGetContact(HANDLE hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); + if(metaIsSubcontact(hContact)) + return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0); return hContact; } bool metaIsSubcontact(HANDLE hContact) @@ -57,32 +58,19 @@ HANDLE metaGetMostOnline(HANDLE hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0); + if(metaIsProtoMetaContacts(hContact)) + return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0); return hContact; } HANDLE metaGetDefault(HANDLE hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0); + if(metaIsProtoMetaContacts(hContact)) + return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0); return hContact; } -HANDLE metaGetCurrent(HANDLE hContact) -{ - bool IsOnline(HANDLE hContact); - if(bMetaContacts) - { - if(!metaIsProtoMetaContacts(hContact)) - return hContact; - HANDLE hcnt = metaGetMostOnline (hContact); - if(!hcnt) - hcnt = metaGetDefault(hContact); - return hcnt; - } - return hContact; -} - DWORD metaGetContactsNum(HANDLE hContact) { -- cgit v1.2.3