diff options
-rw-r--r-- | protocols/MRA/src/MraSendCommand.cpp | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_functions.cpp | 5 | ||||
-rw-r--r-- | protocols/MRA/src/Mra_proto.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index 7f64f1c3c3..6f279c6e49 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -186,7 +186,7 @@ DWORD CMraProto::MraMessageRecv(const CMStringA &szFrom, DWORD dwMsgID) // Adds new contact
DWORD CMraProto::MraAddContact(HANDLE hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMString* wszAuthMessage)
{
- if (szEmail.GetLength() <= 4)
+ if (szEmail.GetLength() <= 4 && !(dwContactFlag & CONTACT_FLAG_GROUP))
return 0;
dwContactFlag |= CONTACT_FLAG_UNICODE_NAME;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 542f750543..2982d45da8 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -316,9 +316,10 @@ DWORD CMraProto::MraMoveContactToGroup(HANDLE hContact, DWORD dwGroupID, LPCTSTR if (m_groups.find((MraGroupItem*)&id) == NULL)
break;
- p = new MraGroupItem(id, CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP, ptszName);
+ DWORD dwContactFlags = (CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP) + (id << 24);
+ p = new MraGroupItem(id, dwContactFlags, ptszName);
m_groups.insert(p);
- MraAddContact(NULL, (CONTACT_FLAG_UNICODE_NAME | CONTACT_FLAG_GROUP) + (id << 24), 0, ptszName, p->m_name);
+ MraAddContact(NULL, dwContactFlags, 0, ptszName, p->m_name);
}
if (dwGroupID != p->m_id) {
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 38dc8ee104..4a6aa1952e 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -608,7 +608,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf) dbei.timestamp = (DWORD)_time32(NULL);
dbei.eventType = EVENTTYPE_ADDED;
dbei.cbBlob = szBuff.GetLength();
- dbei.pBlob = (PBYTE)szBuff.GetBuffer();
+ dbei.pBlob = (PBYTE)szBuff.GetString();
db_event_add(0, &dbei);
}
|