From 5a76a28916e5a329a7056a228dbacbe458e60241 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 7 Jun 2015 10:23:54 +0000 Subject: SkypeWeb: 2-factor auth support pt 1 (it not work). git-svn-id: http://svn.miranda-ng.org/main/trunk@14040 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_utils.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'protocols/SkypeWeb/src/skype_utils.cpp') diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index bfc4cc3bdd..7417673315 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -539,6 +539,19 @@ CMStringA CSkypeProto::ParseUrl(const char *url, const char *token) return CMStringA(start, end - start); } +CMStringA CSkypeProto::GetStringChunk(const char *haystack, const char *start, const char *end) +{ + const char *sstart = strstr(haystack, start); + if (sstart == NULL) + return CMStringA(); + + sstart = sstart + mir_strlen(start); + const char *send = strstr(sstart, end); + if (send == NULL) + return CMStringA(sstart); + return CMStringA(sstart, send - sstart); +} + CMStringA CSkypeProto::ContactUrlToName(const char *url) { return ParseUrl(url, "/8:"); -- cgit v1.2.3