summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-18 07:15:32 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-18 07:15:32 +0000
commitf6ea237b83c24ff0a9bfe8722465cde83c0b5d2d (patch)
tree48ffab29ab35caefdd3fab80a0dec43bead32a4f /protocols/VKontakte/src/vk_proto.cpp
parent10ab40864d776ad079938c36a39aef7a25d19b8c (diff)
VKontakte:
remove PF1_SEARCHBYEMAIL protocol caps (not supported) rework search by name logic git-svn-id: http://svn.miranda-ng.org/main/trunk@10505 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index e8f01b8897..ae146dd2f8 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -174,7 +174,7 @@ DWORD_PTR CVkProto::GetCaps(int type, MCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
- return PF1_IM | PF1_CHAT | PF1_SERVERCLIST | PF1_AUTHREQ | PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_MODEMSG;
+ return PF1_IM | PF1_CHAT | PF1_SERVERCLIST | PF1_AUTHREQ | PF1_BASICSEARCH | PF1_SEARCHBYNAME | PF1_MODEMSG;
case PFLAGNUM_2:
return PF2_ONLINE | PF2_INVISIBLE | PF2_ONTHEPHONE | PF2_IDLE;
@@ -345,9 +345,13 @@ HANDLE CVkProto::SearchByEmail(const PROTOCHAR* email)
HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
{
- TCHAR arg[200];
- mir_sntprintf(arg, SIZEOF(arg), _T("%s %s %s"), nick, firstName, lastName);
- ForkThread(&CVkProto::SearchByStringThread, (void *)arg);
+ PROTOSEARCHBYNAME * psr = new (PROTOSEARCHBYNAME);
+
+ psr->pszFirstName = mir_wstrdup(firstName);
+ psr->pszLastName = mir_wstrdup(lastName);
+ psr->pszNick = mir_wstrdup(nick);
+
+ ForkThread(&CVkProto::SearchThread, (void *)psr);
return (HANDLE)1;
}