summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
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; }