summaryrefslogtreecommitdiff
path: root/protocols/MRA/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-07 14:36:09 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-07 14:36:09 +0000
commit1d28f884c5750602ab5479c6ee978ba9e14adf9d (patch)
treec89dc8d7759891cbc104b90044ab511cb4a1e877 /protocols/MRA/src
parentf25d585f07dafbcfa99e0c33dc9bbe0d72230074 (diff)
ICQ client detection for MRA
git-svn-id: http://svn.miranda-ng.org/main/trunk@12657 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp15
-rw-r--r--protocols/MRA/src/Mra_proto.cpp4
2 files changed, 10 insertions, 9 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index ab7331934f..6667a15608 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -506,13 +506,14 @@ MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe
//check not already on list
CMStringA szEMailLocal;
- for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
- if (mraGetStringA(hContact, "e-mail", szEMailLocal))
- if (szEMailLocal == szEmail) {
- if (bTemporary == FALSE)
- db_unset(hContact, "CList", "NotOnList");
- bFound = true;
- break;
+ for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ if (mraGetStringA(hContact, "e-mail", szEMailLocal))
+ if (szEMailLocal == szEmail) {
+ if (bTemporary == FALSE)
+ db_unset(hContact, "CList", "NotOnList");
+ bFound = true;
+ break;
+ }
}
if (!bFound && bAddIfNeeded) {
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 596fe4d1b9..7951ea777c 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -679,13 +679,13 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf)
delSetting(hContact, DBSETTING_XSTATUSMSG);
}
-
if (dwTemp != ID_STATUS_OFFLINE) { // пишем клиента только если юзер не отключён, иначе не затираем старое
if (!szUserAgentFormatted.IsEmpty()) {
if (getByte("MirVerRaw", MRA_DEFAULT_MIRVER_RAW) == FALSE)
szUserAgentFormatted = MraGetVersionStringFromFormatted(szUserAgentFormatted);
}
- else szUserAgentFormatted = MIRVER_UNKNOWN;
+ else szUserAgentFormatted = (szEmail.Find("@uin.icq") == -1) ? MIRVER_UNKNOWN : "ICQ client";
+
mraSetStringA(hContact, "MirVer", szUserAgentFormatted);
}