diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-24 16:33:54 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-24 16:33:54 +0300 |
commit | 96ac0b0639e1c6396cb084349f9361a1c34ddb57 (patch) | |
tree | aaf6b3f54f94b64c877847ada6dfd69379bc8ba7 /protocols | |
parent | 0956f37bb218b97ff09bfa4d41c764d66ebd1917 (diff) |
fixes #3581 (Jabber: запоминать выбор пользователя в поиске, а также выбранную службу поиска)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index bdf00f50e9..61f27ddab6 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -754,8 +754,8 @@ HANDLE CJabberProto::SearchBasic(const wchar_t *szJid) HANDLE CJabberProto::SearchByEmail(const wchar_t *email)
{
- ptrA szServerName(getStringA("Jud"));
- if (!m_bJabberOnline || email == nullptr || szServerName == nullptr)
+ CMStringA szServerName(getMStringA("Jud"));
+ if (!m_bJabberOnline || email == nullptr || szServerName.IsEmpty())
return nullptr;
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultSetSearch, JABBER_IQ_TYPE_SET, szServerName);
@@ -768,8 +768,8 @@ HANDLE CJabberProto::SearchByEmail(const wchar_t *email) HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName)
{
- ptrA szServerName(getStringA("Jud"));
- if (!m_bJabberOnline || szServerName == nullptr)
+ CMStringA szServerName(getMStringA("Jud"));
+ if (!m_bJabberOnline || szServerName.IsEmpty())
return nullptr;
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultExtSearch, JABBER_IQ_TYPE_SET, szServerName);
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 98d418a548..49f555fd47 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -700,6 +700,10 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR HWND CJabberProto::CreateExtendedSearchUI(HWND parent)
{
+ CMStringA szServerName(getMStringA("Jud"));
+ if (!m_bJabberOnline || szServerName.IsEmpty())
+ return nullptr;
+
if (parent && g_plugin.getInst()) {
ptrW szServer(getWStringA("LoginServer"));
if (szServer == nullptr || mir_wstrcmpi(szServer, L"S.ms"))
|