diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-20 20:30:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-20 20:30:07 +0000 |
commit | 5756772ef9e9fd5b4a730d8a16737996cbec55f5 (patch) | |
tree | b154b3f9e56ceb86b3385d0f59d7341f5ac9b71e /protocols/JabberG/src/jabber_chat.cpp | |
parent | 2a60812b64635ecd655131217f9cb0fa077575dc (diff) |
less cycles, simplier code
git-svn-id: http://svn.miranda-ng.org/main/trunk@5434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index d3315aff28..84cae898da 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1453,11 +1453,9 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co mir_sntprintf(szFullJid, SIZEOF(szFullJid), _T("%s/%s"), item->jid, nick);
HANDLE hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
if (hContact != NULL) {
- for (int i=0; i < item->resourceCount; i++) {
- if (_tcsicmp(item->pResources[i].resourceName, nick) == 0) {
- ppro->setWord(hContact, "Status", item->pResources[i].status);
- break;
- } }
+ JABBER_RESOURCE_STATUS *r = item->findResource(nick);
+ if (r)
+ ppro->setWord(hContact, "Status", r->status);
db_set_b(hContact, "CList", "Hidden", 1);
ppro->setTString(hContact, "Nick", nick);
|