summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/CloudFile/src/cloud_file.cpp2
-rw-r--r--protocols/CloudFile/src/utils.cpp4
-rw-r--r--protocols/CurrencyRates/src/CurrencyRateInfoDlg.cpp2
-rw-r--r--protocols/CurrencyRates/src/CurrencyRatesProviders.cpp2
-rw-r--r--protocols/Discord/src/proto.cpp2
-rw-r--r--protocols/FacebookRM/src/contacts.cpp2
-rw-r--r--protocols/FacebookRM/src/proto.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp6
-rw-r--r--protocols/GmailNotifier/src/check.cpp2
-rw-r--r--protocols/GmailNotifier/src/notify.cpp2
-rw-r--r--protocols/ICQ-WIM/src/groupchats.cpp2
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp2
-rw-r--r--protocols/ICQ-WIM/src/userinfo.cpp2
-rw-r--r--protocols/ICQCorp/src/protocol.cpp2
-rw-r--r--protocols/ICQCorp/src/user.cpp2
-rw-r--r--protocols/IRCG/src/services.cpp2
-rw-r--r--protocols/IRCG/src/userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp2
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp2
-rw-r--r--protocols/NewsAggregator/Src/Utils.cpp2
-rw-r--r--protocols/Non-IM Contact/src/main.cpp2
-rw-r--r--protocols/Sametime/src/sametime_proto.cpp2
-rw-r--r--protocols/Sametime/src/userlist.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_dialogs.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_trouter.cpp2
-rw-r--r--protocols/Steam/src/steam_menus.cpp2
-rw-r--r--protocols/Steam/src/steam_messages.cpp2
-rw-r--r--protocols/Tox/src/tox_contacts.cpp6
-rw-r--r--protocols/Tox/src/tox_messages.cpp2
-rw-r--r--protocols/Twitter/src/contacts.cpp2
-rw-r--r--protocols/VKontakte/src/misc.cpp2
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp2
-rw-r--r--protocols/VKontakte/src/vk_messages.cpp2
-rw-r--r--protocols/Weather/src/weather_contacts.cpp2
-rw-r--r--protocols/WebView/src/webview.cpp2
-rw-r--r--protocols/WebView/src/webview_services.cpp4
-rw-r--r--protocols/YAMN/src/services.cpp6
41 files changed, 51 insertions, 51 deletions
diff --git a/protocols/CloudFile/src/cloud_file.cpp b/protocols/CloudFile/src/cloud_file.cpp
index f6019f8196..6cd398adb3 100644
--- a/protocols/CloudFile/src/cloud_file.cpp
+++ b/protocols/CloudFile/src/cloud_file.cpp
@@ -78,7 +78,7 @@ HANDLE CCloudService::SendFile(MCONTACT hContact, const wchar_t *description, wc
void CCloudService::OpenUploadDialog(MCONTACT hContact)
{
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (!mir_strcmpi(proto, META_PROTO))
hContact = db_mc_getMostOnline(hContact);
diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp
index baef1e9c65..d0cc60e963 100644
--- a/protocols/CloudFile/src/utils.cpp
+++ b/protocols/CloudFile/src/utils.cpp
@@ -40,7 +40,7 @@ bool CanSendToContact(MCONTACT hContact)
if (!hContact)
return false;
- const char *proto = GetContactProto(hContact);
+ const char *proto = Proto_GetBaseAccountName(hContact);
if (!proto)
return false;
@@ -65,7 +65,7 @@ bool CanSendToContact(MCONTACT hContact)
void SendToContact(MCONTACT hContact, const wchar_t *data)
{
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
if (db_get_b(hContact, szProto, "ChatRoom", 0) == TRUE) {
ptrW tszChatRoom(db_get_wsa(hContact, szProto, "ChatRoomID"));
Chat_SendUserMessage(szProto, tszChatRoom, data);
diff --git a/protocols/CurrencyRates/src/CurrencyRateInfoDlg.cpp b/protocols/CurrencyRates/src/CurrencyRateInfoDlg.cpp
index c05520686e..c08340e0cf 100644
--- a/protocols/CurrencyRates/src/CurrencyRateInfoDlg.cpp
+++ b/protocols/CurrencyRates/src/CurrencyRateInfoDlg.cpp
@@ -232,7 +232,7 @@ int CurrencyRates_PrebuildContactMenu(WPARAM wp, LPARAM)
Menu_EnableItem(g_hMenuRefresh, false);
MCONTACT hContact = MCONTACT(wp);
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(szProto, CURRENCYRATES_PROTOCOL_NAME)) {
Menu_ShowItem(g_hMenuRoot, false);
return 0;
diff --git a/protocols/CurrencyRates/src/CurrencyRatesProviders.cpp b/protocols/CurrencyRates/src/CurrencyRatesProviders.cpp
index 31dd4c771a..fdf020fa5e 100644
--- a/protocols/CurrencyRates/src/CurrencyRatesProviders.cpp
+++ b/protocols/CurrencyRates/src/CurrencyRatesProviders.cpp
@@ -58,7 +58,7 @@ void InitProviders()
ICurrencyRatesProvider* GetContactProviderPtr(MCONTACT hContact)
{
- char* szProto = GetContactProto(hContact);
+ char* szProto = Proto_GetBaseAccountName(hContact);
if (nullptr == szProto || 0 != ::_stricmp(szProto, CURRENCYRATES_PROTOCOL_NAME))
return nullptr;
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 72dca1ff6a..c6ffdba35e 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -490,7 +490,7 @@ int CDiscordProto::OnDbEventRead(WPARAM, LPARAM hDbEvent)
return 0;
// filter out only events of my protocol
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(szProto, m_szModuleName))
return 0;
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 2d4c81513e..751eba0904 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -63,7 +63,7 @@ void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu)
bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
- const char *proto = GetContactProto(hContact);
+ const char *proto = Proto_GetBaseAccountName(hContact);
if (proto && !mir_strcmp(m_szModuleName, proto)) {
if (include_chat)
return true;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index ef5f0f6399..1c73d3194f 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -536,7 +536,7 @@ int FacebookProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
int FacebookProto::OnPreCreateEvent(WPARAM, LPARAM lParam)
{
MessageWindowEvent *evt = (MessageWindowEvent *)lParam;
- if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName))
+ if (mir_strcmp(Proto_GetBaseAccountName(evt->hContact), m_szModuleName))
return 0;
std::map<int, time_t>::iterator it = facy.messages_timestamp.find(evt->seq);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index 4302ba3cbd..e9bbc23395 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -538,7 +538,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
break;
}
- char *szProto = (hContact == NULL) ? gg->m_szModuleName : GetContactProto(hContact);
+ char *szProto = (hContact == NULL) ? gg->m_szModuleName : Proto_GetBaseAccountName(hContact);
if (szProto == nullptr)
break;
@@ -735,7 +735,7 @@ int GaduProto::details_init(WPARAM wParam, LPARAM hContact)
}
else {
// Other user details
- char* szProto = GetContactProto(hContact);
+ char* szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr)
return 0;
if (mir_strcmp(szProto, m_szModuleName) || isChatRoom(hContact))
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 693216babe..63a2547cf7 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -375,12 +375,12 @@ wchar_t* GaduProto::gc_getchat(uin_t sender, uin_t *recipients, int recipients_c
static MCONTACT gg_getsubcontact(GaduProto* gg, MCONTACT hContact)
{
- char* szProto = GetContactProto(hContact);
+ char* szProto = Proto_GetBaseAccountName(hContact);
if (szProto && !mir_strcmp(szProto, META_PROTO)) {
int nSubContacts = db_mc_getSubCount(hContact), i;
for (i = 0; i < nSubContacts; i++) {
MCONTACT hMetaContact = db_mc_getSub(hContact, i);
- szProto = GetContactProto(hMetaContact);
+ szProto = Proto_GetBaseAccountName(hMetaContact);
if (szProto && !mir_strcmp(szProto, gg->m_szModuleName))
return hMetaContact;
}
@@ -496,7 +496,7 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
uin = (uin_t)gg->getDword(hMetaContact, GG_KEY_UIN, 0);
}
else {
- szProto = GetContactProto(hContact);
+ szProto = Proto_GetBaseAccountName(hContact);
uin = (uin_t)gg->getDword(hContact, GG_KEY_UIN, 0);
}
diff --git a/protocols/GmailNotifier/src/check.cpp b/protocols/GmailNotifier/src/check.cpp
index d9386b191b..8013b560e7 100644
--- a/protocols/GmailNotifier/src/check.cpp
+++ b/protocols/GmailNotifier/src/check.cpp
@@ -135,7 +135,7 @@ void __cdecl Check_ThreadFunc(void *lpParam)
}
else {
for (auto &it : g_accs) {
- if (GetContactProto(it->hContact)) {
+ if (Proto_GetBaseAccountName(it->hContact)) {
CheckMailInbox(it);
NotifyUser(it);
}
diff --git a/protocols/GmailNotifier/src/notify.cpp b/protocols/GmailNotifier/src/notify.cpp
index 232614a7f8..2413c58023 100644
--- a/protocols/GmailNotifier/src/notify.cpp
+++ b/protocols/GmailNotifier/src/notify.cpp
@@ -69,7 +69,7 @@ static void __cdecl Login_ThreadFunc(Account *curAcc)
int OpenBrowser(WPARAM hContact, LPARAM)
{
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (proto && !mir_strcmp(proto, MODULENAME)) {
Account *curAcc = GetAccountByContact(hContact);
PUDeletePopup(curAcc->popUpHwnd);
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp
index 7d6f991a3d..c3826fc2f6 100644
--- a/protocols/ICQ-WIM/src/groupchats.cpp
+++ b/protocols/ICQ-WIM/src/groupchats.cpp
@@ -91,7 +91,7 @@ class CGroupchatInviteDlg : public CIcqDlgBase
void FilterList(CCtrlClc*)
{
for (auto &hContact : Contacts()) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index bb9c5e1c78..3e41302dd5 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -316,7 +316,7 @@ int CIcqProto::OnDbEventRead(WPARAM, LPARAM hDbEvent)
return 0;
// filter out only events of my protocol
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(szProto, m_szModuleName))
return 0;
diff --git a/protocols/ICQ-WIM/src/userinfo.cpp b/protocols/ICQ-WIM/src/userinfo.cpp
index f30cbc37cd..4aa331f803 100644
--- a/protocols/ICQ-WIM/src/userinfo.cpp
+++ b/protocols/ICQ-WIM/src/userinfo.cpp
@@ -49,7 +49,7 @@ static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam
int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
{
- if (hContact && mir_strcmp(GetContactProto(hContact), m_szModuleName))
+ if (hContact && mir_strcmp(Proto_GetBaseAccountName(hContact), m_szModuleName))
return 0;
if (isChatRoom(hContact))
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp
index c448e4a15e..48afd2f717 100644
--- a/protocols/ICQCorp/src/protocol.cpp
+++ b/protocols/ICQCorp/src/protocol.cpp
@@ -1107,7 +1107,7 @@ void ICQ::updateContactList()
ICQUser *u;
for (auto &hContact : Contacts()) {
- proto = GetContactProto(hContact);
+ proto = Proto_GetBaseAccountName(hContact);
if (proto && !mir_strcmp(proto, protoName)) {
if ((u = getUserByContact(hContact)) == nullptr) {
u = new ICQUser();
diff --git a/protocols/ICQCorp/src/user.cpp b/protocols/ICQCorp/src/user.cpp
index 382b5c5303..fe986a4224 100644
--- a/protocols/ICQCorp/src/user.cpp
+++ b/protocols/ICQCorp/src/user.cpp
@@ -146,7 +146,7 @@ static INT_PTR CALLBACK icqUserInfoDlgProc(HWND hWnd, UINT msg, WPARAM wParam, L
int icqUserInfoInitialise(WPARAM wParam, LPARAM lParam)
{
- char *proto = GetContactProto(lParam);
+ char *proto = Proto_GetBaseAccountName(lParam);
if ((proto == nullptr || mir_strcmp(proto, protoName)) && lParam)
return 0;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index 6b05f1efb8..acc55c5654 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -863,7 +863,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM hContact, LPARAM)
if (hContact == NULL)
return 0;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto && !mir_strcmpi(szProto, m_szModuleName)) {
bool bIsOnline = getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE;
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp
index 7af720f62c..1b59dcda48 100644
--- a/protocols/IRCG/src/userinfo.cpp
+++ b/protocols/IRCG/src/userinfo.cpp
@@ -188,7 +188,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM
int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM hContact)
{
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (!hContact || !szProto || mir_strcmpi(szProto, m_szModuleName))
return 0;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 8acda4ce0c..03ce11c438 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -651,7 +651,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase
void FilterList(CCtrlClc *)
{
for (auto &hContact : Contacts()) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index deac3df095..8c942de3d2 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -947,7 +947,7 @@ class CJabberDlgPrivacyLists : public CJabberDlgBase
void CListFilter()
{
for (auto &hContact : Contacts()) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (!proto || mir_strcmp(proto, m_proto->m_szModuleName))
if (HANDLE hItem = m_clcClist.FindContact(hContact))
m_clcClist.DeleteItem(hItem);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 1a3e01f3d2..4202224b71 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -764,7 +764,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
return 0;
}
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr && !mir_strcmp(szProto, m_szModuleName)) {
OPTIONSDIALOGPAGE odp = {};
odp.dwInitParam = (LPARAM)this;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index a52bbbcbe6..de94d7ef92 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -1019,7 +1019,7 @@ char* TWinErrorCode::getText()
bool CMsnProto::MSN_IsMyContact(MCONTACT hContact)
{
- const char* szProto = GetContactProto(hContact);
+ const char* szProto = Proto_GetBaseAccountName(hContact);
return szProto != nullptr && mir_strcmp(m_szModuleName, szProto) == 0;
}
diff --git a/protocols/NewsAggregator/Src/Utils.cpp b/protocols/NewsAggregator/Src/Utils.cpp
index 00144af250..43928d098c 100644
--- a/protocols/NewsAggregator/Src/Utils.cpp
+++ b/protocols/NewsAggregator/Src/Utils.cpp
@@ -25,7 +25,7 @@ bool UpdateListFlag = FALSE;
bool IsMyContact(MCONTACT hContact)
{
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
return szProto != nullptr && mir_strcmp(MODULENAME, szProto) == 0;
}
diff --git a/protocols/Non-IM Contact/src/main.cpp b/protocols/Non-IM Contact/src/main.cpp
index d554ddc249..59402e6ab1 100644
--- a/protocols/Non-IM Contact/src/main.cpp
+++ b/protocols/Non-IM Contact/src/main.cpp
@@ -12,7 +12,7 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM)
{
char program[MAX_PATH], params[MAX_PATH];
INT_PTR shellEXEerror = 0;
- char* proto = GetContactProto(wParam);
+ char* proto = Proto_GetBaseAccountName(wParam);
if (proto && !mir_strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL) & 0x8000) // ctrl is pressed
editContact(wParam, 0); // for later when i add a second double click setting
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp
index db816ad08b..37b158cb1a 100644
--- a/protocols/Sametime/src/sametime_proto.cpp
+++ b/protocols/Sametime/src/sametime_proto.cpp
@@ -203,7 +203,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg)
{
debugLogW(L"CSametimeProto::SendMsg() hContact=[%x]", hContact);
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
TFakeAckParams* tfap = (TFakeAckParams*)mir_alloc(sizeof(TFakeAckParams));
tfap->proto = this;
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp
index 94545c4d13..0b39a4fa6d 100644
--- a/protocols/Sametime/src/userlist.cpp
+++ b/protocols/Sametime/src/userlist.cpp
@@ -18,7 +18,7 @@ MCONTACT CSametimeProto::FindContactByUserId(const char* id)
bool CSametimeProto::GetAwareIdFromContact(MCONTACT hContact, mwAwareIdBlock* id_block)
{
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
DBVARIANT dbv;
if (proto && !mir_strcmp(m_szModuleName, proto)) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp
index f692c146b4..d8188e6a87 100644
--- a/protocols/SkypeWeb/src/skype_dialogs.cpp
+++ b/protocols/SkypeWeb/src/skype_dialogs.cpp
@@ -96,7 +96,7 @@ void CSkypeGCCreateDlg::btnOk_OnOk(CCtrlButton*)
void CSkypeGCCreateDlg::FilterList(CCtrlClc *)
{
for (auto &hContact : Contacts()) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 5a6a7cc5c4..9a1c5ec85e 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -80,7 +80,7 @@ void CSkypeProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg)
int CSkypeProto::OnPreCreateMessage(WPARAM, LPARAM lParam)
{
MessageWindowEvent *evt = (MessageWindowEvent*)lParam;
- if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName))
+ if (mir_strcmp(Proto_GetBaseAccountName(evt->hContact), m_szModuleName))
return 0;
char *message = (char*)evt->dbei->pBlob;
@@ -179,7 +179,7 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node)
int CSkypeProto::OnDbEventRead(WPARAM hContact, LPARAM hDbEvent)
{
- if (IsOnline() && !isChatRoom(hContact) && !mir_strcmp(GetContactProto(hContact), m_szModuleName))
+ if (IsOnline() && !isChatRoom(hContact) && !mir_strcmp(Proto_GetBaseAccountName(hContact), m_szModuleName))
MarkMessagesRead(hContact, hDbEvent);
return 0;
}
diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp
index eaeec9c62c..c4e28cdfde 100644
--- a/protocols/SkypeWeb/src/skype_trouter.cpp
+++ b/protocols/SkypeWeb/src/skype_trouter.cpp
@@ -196,7 +196,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &)
cle.lParam = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
cle.hIcon = g_plugin.getIcon(IDI_CALL);
- CMStringA service(FORMAT, "%s/IncomingCallCLE", GetContactProto(hContact));
+ CMStringA service(FORMAT, "%s/IncomingCallCLE", Proto_GetBaseAccountName(hContact));
cle.pszService = service.GetBuffer();
CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), Clist_GetContactDisplayName(hContact));
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index aa51b0db71..c2e3e997ae 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -68,7 +68,7 @@ int CSteamProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
if (!hContact)
return 0;
- if (!IsOnline() || mir_strcmp(GetContactProto(hContact), m_szModuleName))
+ if (!IsOnline() || mir_strcmp(Proto_GetBaseAccountName(hContact), m_szModuleName))
return 0;
bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp
index b9b37914a3..27f4a08fb4 100644
--- a/protocols/Steam/src/steam_messages.cpp
+++ b/protocols/Steam/src/steam_messages.cpp
@@ -62,7 +62,7 @@ void CSteamProto::OnMessageSent(const HttpResponse &response, void *arg)
int CSteamProto::OnPreCreateMessage(WPARAM, LPARAM lParam)
{
MessageWindowEvent *evt = (MessageWindowEvent *)lParam;
- if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName))
+ if (mir_strcmp(Proto_GetBaseAccountName(evt->hContact), m_szModuleName))
return 0;
auto it = m_mpOutMessages.find((HANDLE)evt->seq);
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index f9ba570330..ca6de59f40 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -348,7 +348,7 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM hContact)
if (!Proto_IsProtocolLoaded(m_szModuleName))
return 0;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto != nullptr && !mir_strcmp(szProto, m_szModuleName)) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE;
@@ -382,7 +382,7 @@ INT_PTR CToxProto::UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
case PSN_INFOCHANGED:
{
MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
- char *szProto = (hContact == NULL) ? proto->m_szModuleName : GetContactProto(hContact);
+ char *szProto = (hContact == NULL) ? proto->m_szModuleName : Proto_GetBaseAccountName(hContact);
if (szProto != nullptr)
SetDlgItemText(hwnd, IDC_DNS_ID, ptrW(proto->getWStringA(hContact, TOX_SETTINGS_DNS)));
}
@@ -394,7 +394,7 @@ INT_PTR CToxProto::UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
case PSN_APPLY:
MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
- char *szProto = (hContact == NULL) ? proto->m_szModuleName : GetContactProto(hContact);
+ char *szProto = (hContact == NULL) ? proto->m_szModuleName : Proto_GetBaseAccountName(hContact);
if (szProto == nullptr)
break;
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp
index cce56c5a10..4ec181e021 100644
--- a/protocols/Tox/src/tox_messages.cpp
+++ b/protocols/Tox/src/tox_messages.cpp
@@ -145,7 +145,7 @@ void CToxProto::OnReadReceipt(Tox *tox, uint32_t friendNumber, uint32_t messageN
int CToxProto::OnPreCreateMessage(WPARAM, LPARAM lParam)
{
MessageWindowEvent *evt = (MessageWindowEvent*)lParam;
- if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName))
+ if (mir_strcmp(Proto_GetBaseAccountName(evt->hContact), m_szModuleName))
return 0;
char *message = (char*)evt->dbei->pBlob;
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 24eecd5112..a8ea8b28af 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -196,7 +196,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam, LPARAM)
bool TwitterProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (proto && mir_strcmp(m_szModuleName, proto) == 0) {
if (include_chat)
return true;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 21c3d3448f..2d252bf69c 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -722,7 +722,7 @@ int CVkProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
MessageWindowEventData *event = (MessageWindowEventData *)lParam;
- CMStringA szProto(GetContactProto(event->hContact));
+ CMStringA szProto(Proto_GetBaseAccountName(event->hContact));
if (szProto.IsEmpty() || szProto != m_szModuleName)
return 0;
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 3d37a066b5..2f4c4fee5d 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -221,7 +221,7 @@ void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*)
void CVkGCCreateForm::FilterList(CCtrlClc*)
{
for (auto &hContact : Contacts()) {
- char *proto = GetContactProto(hContact);
+ char *proto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact) || m_proto->getDword(hContact, "ID") == VK_FEED_USER)
if (HANDLE hItem = m_clCList.FindContact(hContact))
m_clCList.DeleteItem(hItem);
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp
index dbf4104d81..812966a717 100644
--- a/protocols/VKontakte/src/vk_messages.cpp
+++ b/protocols/VKontakte/src/vk_messages.cpp
@@ -147,7 +147,7 @@ int CVkProto::OnDbEventRead(WPARAM, LPARAM hDbEvent)
if (!hContact)
return 0;
- CMStringA szProto(GetContactProto(hContact));
+ CMStringA szProto(Proto_GetBaseAccountName(hContact));
if (szProto.IsEmpty() || szProto != m_szModuleName)
return 0;
diff --git a/protocols/Weather/src/weather_contacts.cpp b/protocols/Weather/src/weather_contacts.cpp
index b22f8a2222..192844e791 100644
--- a/protocols/Weather/src/weather_contacts.cpp
+++ b/protocols/Weather/src/weather_contacts.cpp
@@ -475,6 +475,6 @@ int ContactDeleted(WPARAM wParam, LPARAM)
BOOL IsMyContact(MCONTACT hContact)
{
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
return szProto != nullptr && mir_strcmp(MODULENAME, szProto) == 0;
}
diff --git a/protocols/WebView/src/webview.cpp b/protocols/WebView/src/webview.cpp
index 2075151f90..921306247a 100644
--- a/protocols/WebView/src/webview.cpp
+++ b/protocols/WebView/src/webview.cpp
@@ -165,7 +165,7 @@ void InitialiseGlobals(void)
int Doubleclick(WPARAM wParam, LPARAM)
{
MCONTACT hContact = wParam;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(MODULENAME, szProto))
return 0;
diff --git a/protocols/WebView/src/webview_services.cpp b/protocols/WebView/src/webview_services.cpp
index 6fe8a258a1..b1ffa1915b 100644
--- a/protocols/WebView/src/webview_services.cpp
+++ b/protocols/WebView/src/webview_services.cpp
@@ -39,7 +39,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
if (!strcmp(cws->szModule, "CList")) {
int invalidpresent = 0;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr || strcmp(szProto, MODULENAME))
return 0;
@@ -111,7 +111,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
int SiteDeleted(WPARAM wParam, LPARAM)
{
MCONTACT hContact = wParam;
- if (mir_strcmp(GetContactProto(hContact), MODULENAME))
+ if (mir_strcmp(Proto_GetBaseAccountName(hContact), MODULENAME))
return 0;
ptrW contactName(g_plugin.getWStringA(hContact, PRESERVE_NAME_KEY));
diff --git a/protocols/YAMN/src/services.cpp b/protocols/YAMN/src/services.cpp
index 7e2a684400..8d945d22e9 100644
--- a/protocols/YAMN/src/services.cpp
+++ b/protocols/YAMN/src/services.cpp
@@ -63,7 +63,7 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam)
static INT_PTR ContactApplication(WPARAM wParam, LPARAM)
{
- char *szProto = GetContactProto(wParam);
+ char *szProto = Proto_GetBaseAccountName(wParam);
if (mir_strcmp(szProto, YAMN_DBMODULE))
return 0;
@@ -165,7 +165,7 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam)
static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM)
{
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(szProto, YAMN_DBMODULE))
return 0;
@@ -217,7 +217,7 @@ static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM)
/*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM)
{
- char *szProto = GetContactProto(wParam);
+ char *szProto = Proto_GetBaseAccountName(wParam);
if (mir_strcmp(szProto, YAMN_DBMODULE))
return;