summaryrefslogtreecommitdiff
path: root/metacontacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'metacontacts.cpp')
-rw-r--r--metacontacts.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/metacontacts.cpp b/metacontacts.cpp
index 30d3a75..46185e4 100644
--- a/metacontacts.cpp
+++ b/metacontacts.cpp
@@ -42,8 +42,9 @@ bool metaIsDefaultSubContact(HANDLE hContact)
HANDLE metaGetContact(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
- return 0;
+ if(metaIsSubcontact(hContact))
+ return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
+ return hContact;
}
bool metaIsSubcontact(HANDLE hContact)
{
@@ -57,30 +58,17 @@ HANDLE metaGetMostOnline(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
- return 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);
- return 0;
-}
-
-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;
+ if(metaIsProtoMetaContacts(hContact))
+ return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
+ return hContact;
}