From 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 4 Dec 2019 16:08:03 +0300 Subject: GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName --- plugins/SeenPlugin/src/menu.cpp | 2 +- plugins/SeenPlugin/src/userinfo.cpp | 2 +- plugins/SeenPlugin/src/utils.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 15651965fb..fc62ca1d0f 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -36,7 +36,7 @@ INT_PTR MenuitemClicked(WPARAM hContact, LPARAM) int BuildContactMenu(WPARAM hContact, LPARAM) { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (!IsWatchedProtocol(szProto) || db_get_b(hContact, szProto, "ChatRoom", false) || !g_plugin.getByte("MenuItem", 1)) { Menu_ShowItem(hmenuitem, false); return 0; diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index e5991e8e86..2f2966d25a 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -65,7 +65,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar int UserinfoInit(WPARAM wparam, LPARAM hContact) { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (IsWatchedProtocol(szProto) && !db_get_b(hContact, szProto, "ChatRoom", false)) { OPTIONSDIALOGPAGE uip = { sizeof(uip) }; uip.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO); diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index bf7c68f8e5..605e82fe8d 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -161,7 +161,7 @@ CMStringW ParseString(const wchar_t *pwszFormat, MCONTACT hcontact) if (!isSeen(hcontact, &st)) return TranslateT(""); - char *szProto = hcontact ? GetContactProto(hcontact) : courProtoName; + char *szProto = hcontact ? Proto_GetBaseAccountName(hcontact) : courProtoName; ptrW info; CMStringW res; @@ -518,7 +518,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lparam; - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (cws->value.type == DBVT_DWORD && !strcmp(cws->szSetting, "LastSeen") && !mir_strcmp(cws->szModule, szProto)) { DBWriteTimeTS(cws->value.dVal, hContact); @@ -563,7 +563,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) if (g_bFileActive) FileWrite(hContact); - char *sProto = GetContactProto(hContact); + char *sProto = Proto_GetBaseAccountName(hContact); if (Proto_GetStatus(sProto) > ID_STATUS_OFFLINE) { myPlaySound(hContact, ID_STATUS_OFFLINE, prevStatus); if (g_plugin.getByte("UsePopups", 0)) @@ -588,7 +588,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) if (prevStatus != cws->value.wVal) myPlaySound(hContact, cws->value.wVal, prevStatus); if (g_plugin.getByte("UsePopups", 0)) if (prevStatus != cws->value.wVal) - ShowPopup(hContact, GetContactProto(hContact), cws->value.wVal | 0x8000); + ShowPopup(hContact, Proto_GetBaseAccountName(hContact), cws->value.wVal | 0x8000); if (g_plugin.getByte("KeepHistory", 0)) HistoryWrite(hContact); -- cgit v1.2.3