summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/misc.cpp2
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp4
-rw-r--r--protocols/VKontakte/src/vk_feed.cpp2
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 4857b38430..3691ae82ff 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -190,7 +190,7 @@ MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate)
if (!bCreate)
return NULL;
- MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD);
+ MCONTACT hNewContact = db_add_contact();
Proto_AddToContact(hNewContact, m_szModuleName);
setDword(hNewContact, "ID", dwUserid);
db_set_ws(hNewContact, "CList", "Group", m_vkOptions.pwszDefaultGroup);
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index f26d1ae631..fa0a1d8b09 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -676,7 +676,7 @@ void CVkProto::LeaveChat(int chat_id, bool close_window, bool delete_chat)
gcd.iType = GC_EVENT_CONTROL;
CallServiceSync(MS_GC_EVENT, close_window? SESSION_TERMINATE:SESSION_OFFLINE, (LPARAM)&gce);
if (delete_chat)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)cc->m_hContact);
+ db_delete_contact(cc->m_hContact);
else
setByte(cc->m_hContact, "off", (int)true);
m_chats.remove(cc);
@@ -746,7 +746,7 @@ INT_PTR __cdecl CVkProto::SvcDestroyKickChat(WPARAM hContact, LPARAM)
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveSmth)
<< CHAR_PARAM("code", code));
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
+ db_delete_contact(hContact);
return 0;
}
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp
index 64c020b12a..85e4fe73a8 100644
--- a/protocols/VKontakte/src/vk_feed.cpp
+++ b/protocols/VKontakte/src/vk_feed.cpp
@@ -24,7 +24,7 @@ void CVkProto::AddFeedSpecialUser()
MCONTACT hContact = FindUser(VK_FEED_USER);
if (!bSpecialContact) {
if (hContact)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
+ db_delete_contact(hContact);
return;
}
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 5b47e4de2c..b546761193 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -756,7 +756,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq
bool bIsFriendGroup = IsGroupUser(hContact) && getBool(hContact, "friend");
if (userID == m_myUserId || userID == VK_FEED_USER || bIsFriendGroup)
continue;
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
+ db_delete_contact(hContact);
}
arContacts.destroy();
@@ -898,7 +898,7 @@ INT_PTR __cdecl CVkProto::SvcBanUser(WPARAM hContact, LPARAM)
<< CHAR_PARAM("code", code));
if (m_vkOptions.bRemoveFromCList)
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact);
+ db_delete_contact(hContact);
return 0;
}