From dc1aa5930ea3ef174f1e47385e301c2415bea259 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Tue, 14 Oct 2014 08:28:52 +0000 Subject: =?UTF-8?q?VKontakte:=20sticker=20support=20part=202=20(sending=20?= =?UTF-8?q?stickers)=20=E2=80=93=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.miranda-ng.org/main/trunk@10779 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/misc.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'protocols/VKontakte/src/misc.cpp') diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index e5f3b42194..8c15e75c20 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -545,4 +545,21 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact) st.hIcon = Skin_GetIconByHandle(GetIconHandle(IDI_READMSG)); mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st); +} + +char* CVkProto::GetStickerId (const char* Msg, int &stickerid) +{ + int iRes = 0; + char HeadMsg[32] = { 0 }; + char* retMsg = NULL; + iRes = sscanf(Msg, "[sticker:%d]", &stickerid); + if (iRes == 1){ + mir_snprintf(HeadMsg, 32, "[sticker:%d]", stickerid); + int retLen = strlen(HeadMsg); + if (retLen