diff options
author | George Hazan <george.hazan@gmail.com> | 2014-06-22 17:59:09 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-06-22 17:59:09 +0000 |
commit | 9a861161c1fc6efa2145430991f75804fb5fd540 (patch) | |
tree | a4b9330192a4b60418c653a3bbbc7e5a99ddecb3 | |
parent | 409d7264947ae132f6185cf5c6d1e4d3ff626f80 (diff) |
message sending fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@9554 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | include/m_metacontacts.h | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 2 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_services.cpp | 4 |
4 files changed, 10 insertions, 7 deletions
diff --git a/include/m_metacontacts.h b/include/m_metacontacts.h index 430abcb01f..55beb66572 100644 --- a/include/m_metacontacts.h +++ b/include/m_metacontacts.h @@ -78,6 +78,11 @@ MCONTACT __forceinline db_mc_getMostOnline(MCONTACT hContact) { return CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
}
+MCONTACT __forceinline db_mc_getSrmmSub(MCONTACT hContact)
+{
+ return CallService(MS_MC_GETSRMMSUB, hContact, 0);
+}
+
// checks whether metacontacts are enabled
MIR_CORE_DLL(BOOL) db_mc_isEnabled(void);
MIR_CORE_DLL(void) db_mc_enable(BOOL);
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index e34eb7b821..a9d817c2e2 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -150,7 +150,7 @@ bool CContactCache::updateStatus() */
void CContactCache::updateMeta(bool fForce)
{
- m_szMetaProto = (m_Valid) ? GetContactProto(db_mc_getMostOnline(cc->contactID)) : NULL;
+ m_szMetaProto = (m_Valid) ? GetContactProto(db_mc_getSrmmSub(cc->contactID)) : NULL;
}
/**
@@ -602,7 +602,5 @@ int CContactCache::getMaxMessageLength() const MCONTACT CContactCache::getActiveContact() const
{
- if (!m_isMeta)
- return m_hContact;
- return CallService(MS_MC_GETSRMMSUB, m_hContact, 0);
+ return (m_isMeta) ? m_hContact : db_mc_getSrmmSub(m_hContact);
}
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 21e412c172..218fc6031b 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -592,7 +592,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM lParam) else { char *szProto = GetContactProto(hContact); if (szProto && !strcmp(szProto, META_PROTO)) - szProto = GetContactProto(db_mc_getMostOnline(hContact)); + szProto = GetContactProto(db_mc_getSrmmSub(hContact)); if (szProto) { DWORD dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0); diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 6516bf09f0..fd7324dfcf 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -216,7 +216,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam,LPARAM lParam) return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
}
- MCONTACT hMostOnline = Meta_GetMostOnline(cc);
+ MCONTACT hMostOnline = db_mc_getSrmmSub(cc->contactID);
if (!hMostOnline) {
// send failure to notify user of reason
HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
@@ -578,7 +578,7 @@ static int Meta_SrmmIconClicked(WPARAM hMeta, LPARAM lParam) return 0;
HMENU hMenu = CreatePopupMenu();
- int iDefault = Meta_GetContactNumber(cc, CallService(MS_MC_GETSRMMSUB, cc->contactID, 0));
+ int iDefault = Meta_GetContactNumber(cc, db_mc_getSrmmSub(cc->contactID));
TCHAR tszItemName[200];
MENUITEMINFO mii = { sizeof(mii) };
|