summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-27 19:37:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-27 19:37:04 +0000
commitf1e65ee68af73283b4b23c447ec2a4672dae4691 (patch)
treea64a55c88267b798053a42c28106c26c4a302790 /protocols
parentd83bb1213828c8e217f0c1079443ef7d8cd8eab4 (diff)
fix for MRA Mobile detection
git-svn-id: http://svn.miranda-ng.org/main/trunk@7919 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index c1f65f4d5c..877bf108c6 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -66,14 +66,25 @@ CMStringA MraGetVersionStringFromFormatted(const CMStringA &szUserAgentFormatted
CMStringA res, tmp;
- if ( !GetParamValue(szUserAgentFormatted, "name", 4, tmp))
+ if (!GetParamValue(szUserAgentFormatted, "name", 4, tmp))
if (tmp == "Miranda IM" || tmp == "Miranda NG") {
GetParamValue(szUserAgentFormatted, "title", 5, res);
return res;
}
- if ( !GetParamValue(szUserAgentFormatted, "client", 6, tmp))
+ if (!GetParamValue(szUserAgentFormatted, "client", 6, tmp)) {
+ if (tmp == "wmagent")
+ tmp = "MobileAgent for WM";
+ else if (tmp == "jagent")
+ tmp = "MobileAgent for Java";
+ else if (tmp == "android")
+ tmp = "MobileAgent for Android";
+ else if (tmp == "iphoneagent")
+ tmp = "MobileAgent for Iphone";
+ else if (tmp == "sagent")
+ tmp = "MobileAgent for Symbian";
res += tmp + " ";
+ }
if ( !GetParamValue(szUserAgentFormatted, "name", 4, tmp))
res += tmp + " ";
@@ -537,13 +548,13 @@ HANDLE CMraProto::MraHContactFromEmail(const CMStringA& szEmail, BOOL bAddIfNeed
}
if (hContact) {
- if ( IsEMailChatAgent(szEmail))
- SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS|SCBIF_EMAIL), -1, -1, 0, CONTACT_INTFLAG_NOT_AUTHORIZED, ID_STATUS_ONLINE, &szEmail, 0, 0);
+ if (IsEMailChatAgent(szEmail))
+ SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS | SCBIF_EMAIL), -1, -1, 0, CONTACT_INTFLAG_NOT_AUTHORIZED, ID_STATUS_ONLINE, &szEmail, 0, 0);
else {
if (bTemporary)
db_set_b(hContact, "CList", "NotOnList", 1);
mraSetStringExA(hContact, "MirVer", MIRVER_UNKNOWN);
- SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS|SCBIF_EMAIL), -1, -1, 0, CONTACT_INTFLAG_NOT_AUTHORIZED, ID_STATUS_OFFLINE, &szEmail, 0, 0);
+ SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS | SCBIF_EMAIL), -1, -1, 0, CONTACT_INTFLAG_NOT_AUTHORIZED, ID_STATUS_OFFLINE, &szEmail, 0, 0);
}
}
}