diff options
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 |