diff options
Diffstat (limited to 'plugins/SecureIM/src/crypt_metacontacts.cpp')
-rw-r--r-- | plugins/SecureIM/src/crypt_metacontacts.cpp | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/plugins/SecureIM/src/crypt_metacontacts.cpp b/plugins/SecureIM/src/crypt_metacontacts.cpp index e99328f1d6..c104044f87 100644 --- a/plugins/SecureIM/src/crypt_metacontacts.cpp +++ b/plugins/SecureIM/src/crypt_metacontacts.cpp @@ -2,42 +2,26 @@ BOOL isProtoMetaContacts(MCONTACT hContact)
{
- if (bMetaContacts) {
- LPSTR proto = GetContactProto(hContact);
- if (proto && !strcmp(proto,"MetaContacts"))
- return true;
- }
+ LPSTR proto = GetContactProto(hContact);
+ if (proto && !strcmp(proto,"MetaContacts"))
+ return true;
return false;
}
BOOL isDefaultSubContact(MCONTACT hContact)
{
- if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,hContact,0),0) == hContact;
-
- return false;
-}
-
-MCONTACT getMetaContact(MCONTACT hContact)
-{
- if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
-
- return 0;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, db_mc_getMeta(hContact), 0) == hContact;
}
MCONTACT getMostOnline(MCONTACT hContact)
{
- if (bMetaContacts)
- return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
-
- return 0;
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
}
// remove all secureim connections on subcontacts
void DeinitMetaContact(MCONTACT hContact)
{
- MCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : getMetaContact(hContact);
+ MCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : db_mc_getMeta(hContact);
if (hMetaContact) {
for (int i=0; i < CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hMetaContact,0); i++) {
MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i);
|