summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_proto.cpp
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-06-04 12:10:46 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-06-04 12:10:46 +0000
commitde1841e8600420cf3cf35cb73d6e0226a9519687 (patch)
tree7ec105c6a941070ddd7e5fa84c3f6a36a9d8dacc /protocols/MSN/src/msn_proto.cpp
parent9f5554e211907907ec149a7c8919bc70daf77026 (diff)
Fixed a memleak in groupchat
Added support for contact list fetching for plain Skype user finally enabling usage of Skype accounts via skylogin.dll (login only working once in a session though, currently cannot find out why). Prevent launching of duplicate keepAliveThread git-svn-id: http://svn.miranda-ng.org/main/trunk@13995 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_proto.cpp')
-rw-r--r--protocols/MSN/src/msn_proto.cpp54
1 files changed, 36 insertions, 18 deletions
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index dce9ae50ff..9e8603def2 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -406,11 +406,13 @@ void __cdecl CMsnProto::MsnSearchAckThread(void* arg)
return;
}
- unsigned res = MSN_ABContactAdd(email, NULL, NETID_MSN, NULL, 1, true);
- switch (res) {
- case 0:
- case 2:
- case 3:
+ if (MyOptions.netId == NETID_SKYPE) MSN_SKYABSearch(email, arg);
+ else {
+ unsigned res = MSN_ABContactAdd(email, NULL, NETID_MSN, NULL, 1, true);
+ switch (res) {
+ case 0:
+ case 2:
+ case 3:
{
PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
@@ -418,25 +420,27 @@ void __cdecl CMsnProto::MsnSearchAckThread(void* arg)
psr.id.t = (TCHAR*)emailT;
psr.nick.t = (TCHAR*)emailT;
psr.email.t = (TCHAR*)emailT;
+
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, arg, (LPARAM)&psr);
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
}
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
break;
- case 1:
- if (strstr(email, "@yahoo.com") == NULL)
+ case 1:
+ if (strstr(email, "@yahoo.com") == NULL)
+ ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
+ #ifdef OBSOLETE
+ else {
+ msnSearchId = arg;
+ MSN_FindYahooUser(email);
+ }
+ #endif
+ break;
+
+ default:
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
-#ifdef OBSOLETE
- else {
- msnSearchId = arg;
- MSN_FindYahooUser(email);
+ break;
}
-#endif
- break;
-
- default:
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, arg, 0);
- break;
}
mir_free(arg);
}
@@ -814,6 +818,20 @@ int __cdecl CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
return Proto_RecvMessage(hContact, pre);
}
+int CMsnProto::GetInfo(MCONTACT hContact, int infoType)
+{
+ if (MyOptions.netId == NETID_SKYPE) {
+ char tEmail[MSN_MAX_EMAIL_LEN];
+ if (db_get_static(hContact, m_szModuleName, "wlid", tEmail, sizeof(tEmail)))
+ db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
+
+ MSN_SKYABGetProfile(tEmail);
+ return 1;
+ }
+ return 0;
+}
+
+
/////////////////////////////////////////////////////////////////////////////////////////
// MsnRecvContacts - creates a database event from the contacts received