diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-13 15:08:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-13 15:08:47 +0000 |
commit | fdc5bdfae8a4a70cfd91ec0a8554005a3c0bbae2 (patch) | |
tree | 8218d1ecb0d5306907f8809bd0b714126c28e675 /protocols/JabberG/src/jabber_chat.cpp | |
parent | e3a9aa77869d8175d8a8483be6f1a976b5c0e1c4 (diff) |
sorted lists are used now in Jabber instead of linear database lookup
git-svn-id: http://svn.miranda-ng.org/main/trunk@16642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 5038fd7160..3617dd6c5b 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1031,10 +1031,11 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* {
CMString jid(FORMAT, _T("%s/%s"), item->jid, him->m_tszResourceName);
- ppro->ListAdd(LIST_VCARD_TEMP, jid);
+ MCONTACT hContact = ppro->AddToListByJID(jid, PALF_TEMPORARY);
+ ppro->ListAdd(LIST_VCARD_TEMP, jid, hContact);
ppro->ListAddResource(LIST_VCARD_TEMP, jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- CallService(MS_USERINFO_SHOWDIALOG, ppro->AddToListByJID(jid, PALF_TEMPORARY), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
break;
@@ -1199,10 +1200,11 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (TCHAR *tmp = _tcschr(jid, _T('/')))
*tmp = 0;
- ppro->ListAdd(LIST_VCARD_TEMP, jid);
+ MCONTACT hContact = ppro->AddToListByJID(jid, PALF_TEMPORARY);
+ ppro->ListAdd(LIST_VCARD_TEMP, jid, hContact);
ppro->ListAddResource(LIST_VCARD_TEMP, jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- CallService(MS_USERINFO_SHOWDIALOG, ppro->AddToListByJID(jid, PALF_TEMPORARY), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, hContact, 0);
}
break;
@@ -1358,7 +1360,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co {
TCHAR szFullJid[JABBER_MAX_JID_LEN];
mir_sntprintf(szFullJid, _T("%s/%s"), item->jid, nick);
- MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
+ MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, true, false);
if (hContact != NULL) {
pResourceStatus r(item->findResource(nick));
if (r)
|