From e3b515c53f4e3d77dd09c43009f3b0725f0949eb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 26 Jun 2013 07:04:37 +0000 Subject: Some improvements and cleanup in skype git-svn-id: http://svn.miranda-ng.org/main/trunk@5137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_utils.cpp | 69 +++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 38 deletions(-) (limited to 'protocols/Skype/src/skype_utils.cpp') 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 +} -- cgit v1.2.3