diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-14 08:28:52 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-14 08:28:52 +0000 |
commit | dc1aa5930ea3ef174f1e47385e301c2415bea259 (patch) | |
tree | 8be84ab91b85ac3a3ce000c1261270bbd68df9be /protocols/VKontakte/src/misc.cpp | |
parent | 840091c772b27f97043bede8ee6416cb6c157f0d (diff) |
VKontakte:
sticker support part 2 (sending stickers) – complete
git-svn-id: http://svn.miranda-ng.org/main/trunk@10779 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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<strlen(Msg))
+ retMsg = mir_strdup(&Msg[retLen]);
+ return retMsg;
+ }
+ stickerid = 0;
+ return NULL;
}
\ No newline at end of file |