summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-10 17:00:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-10 17:00:07 +0300
commit728b55c7e6fc307f084caabfdaf6a89aa6cf4f1d (patch)
tree1e9899f3b3be75dfc3e98a0f8173f301f0b4bdd5
parentd567fef38c438ec8854558ed0ff82e25fcde3a37 (diff)
Jabber: fix for hiding software version via caps request
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index 20c0d42f3e..06e6e7f987 100755
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -370,7 +370,12 @@ bool CJabberProto::HandleCapsInfoRequest(const TiXmlElement *, CJabberIqInfo *pI
if (szNode)
query << XATTR("node", szNode);
- CMStringA szName(FORMAT, "Miranda %d.%d.%d.%d", __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM);
+ CMStringA szName(getMStringA("Identity")); // hidden setting to be entered from dbeditor++
+ if (szName.IsEmpty()) {
+ szName.Append("Miranda");
+ if (m_bAllowVersionRequests)
+ szName.AppendFormat(" %d.%d.%d.%d", __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM);
+ }
query << XCHILD("identity") << XATTR("category", "client") << XATTR("type", "pc") << XATTR("name", szName);
for (auto &it : g_JabberFeatCapPairs)