diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-05-25 12:58:29 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-05-25 12:58:29 +0000 |
commit | e45307525555ee23035c0d87fbac3ed8ce5a31e8 (patch) | |
tree | 892e2f2652868b0f98b1857bc4f9a900ef07d8c8 /protocols | |
parent | 477ffda3aaa80512826a1196ca3819640e0a879c (diff) |
git-svn-id: http://svn.miranda-ng.org/main/trunk@175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/process.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/protocols/FacebookRM/process.cpp b/protocols/FacebookRM/process.cpp index eceea978a5..4dd98c5678 100644 --- a/protocols/FacebookRM/process.cpp +++ b/protocols/FacebookRM/process.cpp @@ -576,10 +576,35 @@ void FacebookProto::ProcessFriendRequests( void* ) if (fbu->user_id.length() && fbu->real_name.length())
{
- HANDLE hContact = this->AddToContactList(fbu, false, fbu->real_name.c_str());
- DBWriteContactSettingString(hContact, this->m_szModuleName, FACEBOOK_KEY_APPROVE, get.c_str());
+ HANDLE hContact = AddToContactList(fbu, false, fbu->real_name.c_str());
+ DBWriteContactSettingString(hContact, m_szModuleName, FACEBOOK_KEY_APPROVE, get.c_str());
LOG(" Friendship request from: %s (%s)", fbu->real_name.c_str(), fbu->user_id.c_str());
+
+ /* TODO: How to write event for auth requests etc.? */
+/* CCSDATA ccs;
+ PROTORECVEVENT pre;
+
+ ccs.szProtoService = PSR_AUTH;
+ ccs.hContact = hContact;
+ ccs.wParam = 0;
+ ccs.lParam = (LPARAM)⪯
+ pre.flags |= PREF_UTF;
+ pre.timestamp = ::time(NULL);
+ pre.lParam = sizeof(DWORD) + sizeof(HANDLE) + fbu->real_name.length() + 5;
+
+ char* pCurBlob = (char*)alloca(pre.lParam);
+ pre.szMessage = pCurBlob;
+
+ *(PDWORD)pCurBlob = 0; pCurBlob += sizeof(DWORD); // UID
+ *(PHANDLE)pCurBlob = hContact; pCurBlob += sizeof(HANDLE); // Contact Handle
+ strcpy(pCurBlob, fbu->real_name.c_str()); pCurBlob += fbu->real_name.length() + 1; // Nickname
+ *pCurBlob = '\0'; pCurBlob++; // First Name
+ *pCurBlob = '\0'; pCurBlob++; // Last Name
+ *pCurBlob = '\0'; pCurBlob++; // E-mail
+ *pCurBlob = '\0'; // Reason
+
+ CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs); */
} else {
LOG(" !!! Wrong friendship request");
}
|