summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp47
-rw-r--r--protocols/SkypeWeb/src/stdafx.h1
3 files changed, 44 insertions, 6 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index a7ee562812..0e00c5753b 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -63,7 +63,7 @@ MCONTACT CSkypeProto::FindContact(const char *skypename)
for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
{
ptrA cSkypename(getStringA(hContact, SKYPE_SETTINGS_ID));
- if (mir_strcmpi(skypename, cSkypename) == 0)
+ if (!mir_strcmpi(skypename, cSkypename))
break;
}
return hContact;
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index cf0219663b..097e9345af 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -566,24 +566,61 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
*(szCommand++) = 0;
// parameters
- TCHAR *szSecondParam = szCommand ? _tcschr(szCommand, _T(';')) : NULL;
+ TCHAR *szSecondParam = szCommand ? _tcschr(szCommand, _T('&')) : NULL;
if (szSecondParam)
*(szSecondParam++) = 0;
- MCONTACT hContact = AddContact(_T2A(szJid), true);
// no command or message command
if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("chat"))))
{
+ if (szSecondParam)
+ {
+ TCHAR *szChatId = _tcsstr(szSecondParam, _T("id="));
+ if (szChatId)
+ {
+ szChatId += 5;
+ StartChatRoom(szChatId, szChatId);
+ return 0;
+ }
+ }
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL);
return 0;
}
- else if (szCommand && !_tcsicmp(szCommand, _T("call")))
+ else if (!_tcsicmp(szCommand, _T("call")))
{
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
NotifyEventHooks(m_hCallHook, (WPARAM)hContact, (LPARAM)0);
return 0;
}
- else if (szCommand && !_tcsicmp(szCommand, _T("userinfo"))){ return 0;}
-
+ else if (!_tcsicmp(szCommand, _T("userinfo"))){ return 0;}
+ else if (!_tcsicmp(szCommand, _T("add")))
+ {
+ MCONTACT hContact = FindContact(_T2A(szJid));
+ if (hContact == NULL)
+ {
+ PROTOSEARCHRESULT psr = { 0 };
+ psr.id = mir_tstrdup(szJid);
+ psr.nick = mir_tstrdup(szJid);
+ psr.flags = PSR_TCHAR;
+
+ ADDCONTACTSTRUCT acs;
+ acs.handleType = HANDLE_SEARCHRESULT;
+ acs.szProto = m_szModuleName;
+ acs.psr = &psr;
+ CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
+ }
+ return 0;
+ }
+ if (!_tcsicmp(szCommand, _T("sendfile")))
+ {
+ MCONTACT hContact = AddContact(_T2A(szJid), true);
+ CallService(MS_FILE_SENDFILE, hContact, NULL);
+ }
+ if (!_tcsicmp(szCommand, _T("voicemail")))
+ {
+ return 1;
+ }
return 1; /* parse failed */
}
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h
index 6306328ee8..fbe0b7ff5e 100644
--- a/protocols/SkypeWeb/src/stdafx.h
+++ b/protocols/SkypeWeb/src/stdafx.h
@@ -57,6 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_imgsrvc.h>
#include <m_xml.h>
#include <m_assocmgr.h>
+#include <m_file.h>
struct CSkypeProto;