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/Nudge/src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 4737abcf86..1112a21959 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -53,7 +53,7 @@ static INT_PTR NudgeShowMenu(WPARAM wParam, LPARAM lParam) static INT_PTR NudgeSend(WPARAM hContact, LPARAM lParam) { - char *protoName = GetContactProto(hContact); + char *protoName = Proto_GetBaseAccountName(hContact); int diff = time(0) - db_get_dw(hContact, "Nudge", "LastSent", time(0) - 30); if (diff < GlobalNudge.sendTimeSec) { wchar_t msg[500]; @@ -92,7 +92,7 @@ void OpenContactList() static int NudgeReceived(WPARAM hContact, LPARAM lParam) { - char *protoName = GetContactProto(hContact); + char *protoName = Proto_GetBaseAccountName(hContact); DWORD currentTimestamp = time(0); DWORD nudgeSentTimestamp = lParam ? (DWORD)lParam : currentTimestamp; @@ -394,7 +394,7 @@ static int TabsrmmButtonInit(WPARAM, LPARAM) void HideNudgeButton(MCONTACT hContact) { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (!ProtoServiceExists(szProto, PS_SEND_NUDGE)) { BBButton bbd = {}; bbd.pszModuleName = "Nudge"; @@ -415,7 +415,7 @@ static int ContactWindowOpen(WPARAM, LPARAM lParam) static int PrebuildContactMenu(WPARAM hContact, LPARAM) { - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); if (szProto != nullptr) { bool isChat = db_get_b(hContact, szProto, "ChatRoom", false) != 0; NudgeShowMenu((WPARAM)szProto, !isChat); -- cgit v1.2.3