diff options
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index eb5eb1e4f1..dc7c5b4abd 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -543,12 +543,9 @@ void CSkypeProto::ReplaceSpecialChars(wchar_t *text, wchar_t replaceWith) INT_PTR CSkypeProto::ParseSkypeUri(WPARAM wParam, LPARAM lParam)
{
- return 1;
if (CSkypeProto::instanceList.getCount() == 0 || !CSkypeProto::instanceList[0]->IsOnline())
return 1;
- CSkypeProto::ShowNotification((wchar_t *)lParam);
-
CSkypeProto *ppro = CSkypeProto::instanceList[0];
wchar_t *args = ::mir_wstrdup((wchar_t *)lParam);
@@ -560,49 +557,45 @@ INT_PTR CSkypeProto::ParseSkypeUri(WPARAM wParam, LPARAM lParam) if (q == NULL)
return 1;
- wchar_t *c = q + 1; q = 0;
+ wchar_t *c = q + 1; *q = 0;
+ StringList commands = StringList(c, L"&");
StringList participants = StringList(args, L";");
- StringList commands = StringList(q + 1, L"&");
-
ptrW command, arg, commandAndParam;
- if (::lstrcmpiW( commands[0], L"chat") != 0)
+ if ( !::lstrcmpiW(commands[0], L"chat"))
+ ppro->ChatRoomParseUriComands(c);
+ else
{
wchar_t message[1024];
- ::mir_sntprintf(message, SIZEOF(message), ::TranslateT("Command\"%s\" is unsupported"), args);
+ ::mir_sntprintf(message, SIZEOF(message), ::TranslateT("Command \"%s\" is unsupported"), args);
CSkypeProto::ShowNotification(message);
return 1;
}
-
- ChatRoomParam *param = new ChatRoomParam(NULL, participants, ppro);
-
- for (size_t i = 1; i < commands.size(); i++)
- {
- commandAndParam = command = ::mir_wstrdup(commands[i]);
- wchar_t * p = ::wcschr(commandAndParam, L'=');
- if (p != NULL)
- {
- arg = p + 1;
- p = 0;
- }
-
- if ( !::lstrcmpiW(commands[0], L"blob"))
- {
- ppro->JoinToChat(arg);
- break;
- }
- if ( !::lstrcmpiW( commands[0], L"topic"))
- {
- ::wcscpy(param->topic, arg);
- ppro->CreateChat(param);
- break;
-
- }
- //param
- }
-
- delete param;
+ //for (size_t i = 1; i < commands.size(); i++)
+ //{
+ // command = ::mir_wstrdup(commands[i]);
+ // wchar_t * p = ::wcschr(command, L'=');
+ // if (p != NULL)
+ // {
+ // arg = p + 1;
+ // *p = 0;
+ // }
+
+ // if ( !::lstrcmpiW(command, L"blob"))
+ // {
+ // ppro->JoinToChat(arg);
+ // break;
+ // }
+ // else if ( !::lstrcmpiW(command, L"topic") && !participants.empty())
+ // {
+ // ChatRoomParam param(NULL, participants, ppro);
+ // ::wcscpy(param.topic, arg);
+ // ppro->CreateChatRoom(¶m);
+ // break;
+ //
+ // }
+ //}
return 0;
-}
\ No newline at end of file +}
|