diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-10 17:00:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-10 17:00:07 +0300 |
commit | 728b55c7e6fc307f084caabfdaf6a89aa6cf4f1d (patch) | |
tree | 1e9899f3b3be75dfc3e98a0f8173f301f0b4bdd5 | |
parent | d567fef38c438ec8854558ed0ff82e25fcde3a37 (diff) |
Jabber: fix for hiding software version via caps request
-rwxr-xr-x | protocols/JabberG/src/jabber_caps.cpp | 7 |
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)
|