summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-08-21 04:28:31 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-08-21 04:28:31 +0000
commitc546793b2a39c59a688e972e06138f0c6b432f63 (patch)
treed553f59e1999b62e49afbcb815305e41649dc290 /protocols/Tox/src/tox_proto.cpp
parent78bcdef0ca6f1ee54b5e3d1d728e5d6808fd6ed0 (diff)
Tox: ability to search friends via toxme.se
git-svn-id: http://svn.miranda-ng.org/main/trunk@10249 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r--protocols/Tox/src/tox_proto.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 7682f80216..18af6e9a73 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -40,7 +40,7 @@ DWORD_PTR __cdecl CToxProto::GetCaps(int type, MCONTACT hContact)
switch (type)
{
case PFLAGNUM_1:
- return PF1_IM | PF1_AUTHREQ | PF1_BASICSEARCH;
+ return PF1_IM | PF1_AUTHREQ | PF1_BASICSEARCH | PF1_SEARCHBYEMAIL;
case PFLAGNUM_2:
return PF2_ONLINE | PF2_SHORTAWAY | PF2_LIGHTDND;
case PFLAGNUM_4:
@@ -141,7 +141,18 @@ HANDLE __cdecl CToxProto::SearchBasic(const PROTOCHAR* id)
return (HANDLE)1;
}
-HANDLE __cdecl CToxProto::SearchByEmail(const PROTOCHAR* email) { return 0; }
+HANDLE __cdecl CToxProto::SearchByEmail(const PROTOCHAR* email)
+{
+ if (!this->IsOnline())
+ {
+ return 0;
+ }
+
+ ForkThread(&CToxProto::SearchByNameAsync, mir_tstrdup(email));
+
+ return (HANDLE)1;
+}
+
HANDLE __cdecl CToxProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) { return 0; }
HWND __cdecl CToxProto::SearchAdvanced(HWND owner) { return 0; }
HWND __cdecl CToxProto::CreateExtendedSearchUI(HWND owner) { return 0; }