summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-23 15:43:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-23 15:43:18 +0000
commit480aab2b3ffb0b439e160a8c716ef0d982af1acf (patch)
tree19a065c7ac15df14a6a32435d4e24d36283ae3ac /plugins/AVS/src/utils.cpp
parent7d88f20d344ebd7c8db2778feda873b251019d9a (diff)
removing direct access to metas: AVS
git-svn-id: http://svn.miranda-ng.org/main/trunk@9924 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src/utils.cpp')
-rw-r--r--plugins/AVS/src/utils.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index e4ab45e2ff..f1a1809be5 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -508,14 +508,12 @@ protoPicCacheEntry *GetProtoDefaultAvatar(MCONTACT hContact)
MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked)
{
- if (db_get_b(NULL, META_PROTO, "Enabled", 0)) {
- if (db_get_dw(hContact, META_PROTO, "NumContacts", 0) >= 1) {
- if (locked == -1)
- locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
+ if (db_mc_isMeta(hContact)) {
+ if (locked == -1)
+ locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
- if (!locked)
- hContact = db_mc_getMostOnline(hContact);
- }
+ if (!locked)
+ hContact = db_mc_getMostOnline(hContact);
}
return hContact;
}