INT_PTR CMsnProto::MsnSendNetMeeting(WPARAM wParam, LPARAM) { if (!msnLoggedIn) return 0; MCONTACT hContact = MCONTACT(wParam); char szEmail[MSN_MAX_EMAIL_LEN]; if (MSN_IsMeByContact(hContact, szEmail)) return 0; ThreadData* thread = MSN_GetThreadByContact(szEmail); if (thread == NULL) { MessageBox(NULL, TranslateT("You must be talking to start Netmeeting"), TranslateT("MSN Protocol"), MB_OK | MB_ICONERROR); return 0; } char msg[1024]; mir_snprintf(msg, _countof(msg), "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n" "Application-Name: NetMeeting\r\n" "Application-GUID: {44BBA842-CC51-11CF-AAFA-00AA00B6015C}\r\n" "Session-Protocol: SM1\r\n" "Invitation-Command: INVITE\r\n" "Invitation-Cookie: %i\r\n" "Session-ID: {1A879604-D1B8-11D7-9066-0003FF431510}\r\n\r\n", MSN_GenRandom()); thread->sendMessage('N', NULL, 1, msg, MSG_DISABLE_HDR); return 0; }
ThreadData* CMsnProto::MSN_StartSB(const char* wlid, bool& isOffline) { isOffline = false; ThreadData *thread = MSN_GetThreadByContact(wlid); if (thread == NULL) { MCONTACT hContact = MSN_HContactFromEmail(wlid); WORD wStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE); if (wStatus != ID_STATUS_OFFLINE) { if (MSN_GetUnconnectedThread(wlid) == NULL && MsgQueue_CheckContact(wlid, 5) == NULL) msnNsThread->sendPacket("XFR", "SB"); } else isOffline = true; } return thread; }