summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 20:50:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 20:50:07 +0000
commit13c033c257f6c083b0c46b4fa28601db5a0b6335 (patch)
treecb6c2d292df718d1cddd885ad1029a0b81f1b7e4 /plugins/AvatarHistory/src
parent367e673a5a3d4d49b2ef1bfbf57a1a5828a2d174 (diff)
MS_MC_GETMETACONTACT => db_mc_getMeta
git-svn-id: http://svn.miranda-ng.org/main/trunk@8317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AvatarHistory/src')
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index d56a2a20cf..ae493d33ad 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -156,18 +156,15 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
else
ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename);
- if (ServiceExists(MS_MC_GETMETACONTACT)) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
-
- if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) {
- TCHAR filename[MAX_PATH] = _T("");
-
- GetOldStyleAvatarName(filename, hMetaContact);
- if (CopyImageFile(avatar->filename, filename))
- ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), filename);
- else
- ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), filename);
- }
+ MCONTACT hMetaContact = db_mc_getMeta(hContact);
+ if (hMetaContact && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) {
+ TCHAR filename[MAX_PATH] = _T("");
+
+ GetOldStyleAvatarName(filename, hMetaContact);
+ if (CopyImageFile(avatar->filename, filename))
+ ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), filename);
+ else
+ ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), filename);
}
}
}
@@ -201,11 +198,9 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
if (opts.log_per_contact_folders) {
CreateOldStyleShortcut(hContact, history_filename);
- if (ServiceExists(MS_MC_GETMETACONTACT)) {
- MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
- if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY))
- CreateOldStyleShortcut(hMetaContact, history_filename);
- }
+ MCONTACT hMetaContact = db_mc_getMeta(hContact);
+ if (hMetaContact && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY))
+ CreateOldStyleShortcut(hMetaContact, history_filename);
}
}
}