diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_proto.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 0b66f02421..4d1e236bce 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -304,4 +304,40 @@ int CSkypeProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam }
return 1;
+}
+
+int CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
+{
+ PROTOSEARCHRESULT **isrList = (PROTOSEARCHRESULT**)pre->szMessage;
+ DWORD cbBlob = 0;
+ BYTE *pBlob;
+ BYTE *pCurBlob;
+ int i;
+
+ int nCount = *((LPARAM*)pre->lParam);
+ char* szMessageId = ((char*)pre->lParam + sizeof(LPARAM));
+
+ //if (GetMessageFromDb(hContact, szMessageId, pre->timestamp)) return 0;
+
+ for (i = 0; i < nCount; i++)
+ cbBlob += int(/*mir_tstrlen(isrList[i]->nick.t)*/0 + 2 + mir_tstrlen(isrList[i]->id.t) + mir_strlen(szMessageId));
+
+ pBlob = (PBYTE)mir_calloc(cbBlob);
+
+ for (i = 0, pCurBlob = pBlob; i < nCount; i++)
+ {
+ //mir_strcpy((char*)pCurBlob, _T2A(isrList[i]->nick.t));
+ pCurBlob += mir_strlen((PCHAR)pCurBlob) + 1;
+
+ mir_strcpy((char*)pCurBlob, _T2A(isrList[i]->id.t));
+ pCurBlob += mir_strlen((char*)pCurBlob) + 1;
+ }
+
+ //memcpy(pCurBlob + 1, szMessageId, mir_strlen(szMessageId));
+
+ AddEventToDb(hContact, EVENTTYPE_CONTACTS, pre->timestamp, (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0, cbBlob, pBlob);
+
+ mir_free(pBlob);
+
+ return 0;
}
\ No newline at end of file |