diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 2839a73e30..8480bcacce 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -5,7 +5,7 @@ Jabber Protocol Plugin for Miranda NG Copyright (c) 2002-04 Santithorn Bunchua
Copyright (c) 2005-12 George Hazan
Copyright (c) 2007 Maxim Mluhov
-Copyright (C) 2012-24 Miranda NG team
+Copyright (C) 2012-25 Miranda NG team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -467,7 +467,7 @@ void CJabberProto::OnIqResultGetRoster(const TiXmlElement *iqNode, CJabberIqInfo continue;
MCONTACT hContact = HContactFromJID(jid);
- if (hContact == 0) // Received roster has a new JID.
+ if (hContact == 0 && !IsMyOwnJID(jid)) // Received roster has a new JID.
hContact = DBCreateContact(jid, nick, false, false); // Add the jid (with empty resource) to a Miranda's contact list.
JABBER_LIST_ITEM *item = ListAdd(LIST_ROSTER, jid, hContact);
@@ -760,17 +760,7 @@ void CJabberProto::OnIqResultGetVcard(const TiXmlElement *iqNode, CJabberIqInfo* if (hContact != 0) {
if (sscanf(n->GetText(), "%d-%d-%d", &nYear, &nMonth, &nDay) == 3) {
hasBday = true;
- setWord(hContact, "BirthYear", (uint16_t)nYear);
- setByte(hContact, "BirthMonth", (uint8_t)nMonth);
- setByte(hContact, "BirthDay", (uint8_t)nDay);
-
- SYSTEMTIME sToday = { 0 };
- GetLocalTime(&sToday);
- int nAge = sToday.wYear - nYear;
- if (sToday.wMonth < nMonth || (sToday.wMonth == nMonth && sToday.wDay < nDay))
- nAge--;
- if (nAge)
- setWord(hContact, "Age", (uint16_t)nAge);
+ Contact::SetBirthday(hContact, nDay, nMonth, nYear);
}
}
else {
|