summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin
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/SeenPlugin
parent3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff)
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SeenPlugin/src/userinfo.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp8
3 files changed, 6 insertions, 6 deletions
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("<never seen>");
- 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);