diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
commit | f60c78abfbd5f279b30de729046b805bba8e00b0 (patch) | |
tree | 1120bba828b2151604e98163aa7a3fe221264068 /plugins/TabSRMM | |
parent | 26a653ecae7edbeefb7966e08714e152c73b78eb (diff) |
Proto_GetStatus is used everywhere instead of PS_GETSTATUS
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat_tools.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendlater.cpp | 2 |
7 files changed, 7 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 23c2bde316..79bc186c61 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -151,9 +151,8 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) char *szProto = dat ? dat->m_szProto : si->pszModule;
if (nen_options.dwStatusMask != -1) {
- DWORD dwStatus = 0;
if (szProto != nullptr) {
- dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int dwStatus = Proto_GetStatus(szProto);
if (!(dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & nen_options.dwStatusMask))) // should never happen, but...
return 0;
}
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 92fc9fe9c6..89d57735f9 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -765,7 +765,7 @@ int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int wi if (nen_options.dwStatusMask != -1) {
if (szProto != nullptr) {
- DWORD dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int dwStatus = Proto_GetStatus(szProto);
if (!(dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & nen_options.dwStatusMask))) // should never happen, but...
return 0;
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 38f59af9b9..5653d2dd2b 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -972,7 +972,7 @@ void CTabBaseDlg::DM_NotifyTyping(int mode) if (!(typeCaps & PF4_SUPPORTTYPING)) return; - DWORD protoStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0); + DWORD protoStatus = Proto_GetStatus(szProto); if (protoStatus < ID_STATUS_ONLINE) return; diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index a2e9c5d0c7..ba03372f6f 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -549,7 +549,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c) return;
// don't log them if WE are logging off
- if (CallProtoService(c->getProto(), PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE)
+ if (Proto_GetStatus(c->getProto()) == ID_STATUS_OFFLINE)
return;
WORD wStatus = LOWORD(wParam);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 7bcb6a345e..e7ca3940e3 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -462,7 +462,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) szProto = GetContactProto(db_mc_getSrmmSub(hContact)); if (szProto) { - DWORD dwStatus = (DWORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0); + int dwStatus = Proto_GetStatus(szProto); if (dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & dwStatusMask)) // should never happen, but... bAllowAutoCreate = true; } diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index c138fc9909..94ff7530a0 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1734,7 +1734,7 @@ void CTabBaseDlg::SendHBitmapAsFile(HBITMAP hbmp) const bool fSend = true;
const char *szProto = m_cache->getActiveProto();
- WORD wMyStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int wMyStatus = Proto_GetStatus(szProto);
DWORD protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0);
DWORD typeCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 37f642ca4e..e98a46c087 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -376,7 +376,7 @@ int CSendLater::sendIt(CSendLaterJob *job) if (!hContact || szProto == nullptr)
return 0;
- WORD wMyStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ int wMyStatus = Proto_GetStatus(szProto);
// status mode checks
if (wMyStatus == ID_STATUS_OFFLINE) {
|