diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/miranda.h | 2 | ||||
-rw-r--r-- | src/core/stdautoaway/src/autoaway.cpp | 7 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/core/miranda.h b/src/core/miranda.h index c5008e358a..5d31e64aed 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -142,6 +142,8 @@ void KillModuleMenus(int hLangpack); extern LIST<PROTOACCOUNT> accounts;
+INT_PTR ProtoCallService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
+
PROTOACCOUNT* Proto_CreateAccount(const char *szModuleName, const char *szBaseProto, const TCHAR *tszAccountName);
PROTOACCOUNT* __fastcall Proto_GetAccount(const char *accName);
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index f501ec2bda..e3aa0603de 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -45,12 +45,11 @@ static bool Proto_IsAccountLocked(PROTOACCOUNT *pa) return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
}
-static void Proto_SetStatus(const char* szProto, unsigned status)
+static void Proto_SetStatus(const char *szProto, unsigned status)
{
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
- TCHAR *awayMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, status, (LPARAM)szProto);
- CallProtoService(szProto, PS_SETAWAYMSG, status, (LPARAM)awayMsg);
- mir_free(awayMsg);
+ ptrT awayMsg((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, status, (LPARAM)szProto));
+ CallProtoService(szProto, PS_SETAWAYMSG, status, awayMsg);
}
CallProtoService(szProto, PS_SETSTATUS, status, 0);
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 806fa9a128..e8e9071dd4 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -989,7 +989,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *si USERINFO *ui = pci->SM_GetUserFromIndex(si->ptszID, si->pszModule, currentHovered);
if (ui) {
if (ProtoServiceExists(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
- TCHAR *p = (TCHAR*)ProtoCallService(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)si->ptszID, (LPARAM)ui->pszUID);
+ TCHAR *p = (TCHAR*)CallProtoService(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)si->ptszID, (LPARAM)ui->pszUID);
if (p != NULL) {
_tcsncpy_s(tszBuf, p, _TRUNCATE);
mir_free(p);
|