summaryrefslogtreecommitdiff
path: root/plugins/Nudge/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-12-04 16:08:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-12-04 16:08:03 +0300
commit3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch)
tree59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/Nudge/src
parent3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff)
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/Nudge/src')
-rw-r--r--plugins/Nudge/src/main.cpp8
1 files changed, 4 insertions, 4 deletions
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);