summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_caps.cpp35
-rwxr-xr-xprotocols/JabberG/src/jabber_util.cpp6
2 files changed, 32 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index c122c20f7f..6b1f0b6649 100755
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -544,13 +544,23 @@ CJabberClientCaps * CJabberClientCapsManager::FindClient(const wchar_t *szNode)
return pClient;
}
+
void CJabberClientCapsManager::AddDefaultCaps()
{
- SetClientCaps(L"http://client/caps", szCoreVersion, JABBER_CAPS_MIRANDA_ALL);
+ SetClientCaps(L"http://client/caps", L"0.0.0.0", JABBER_CAPS_MIRANDA_ALL);
for (int i=0; g_JabberFeatCapPairsExt[i].szFeature; i++)
if (g_JabberFeatCapPairsExt[i].Valid())
+ {
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"mirotr")) //we do not want to show miranda related caps
+ continue;
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"secureim")) //we do not want to show miranda related caps
+ continue;
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"new_gpg")) //we do not want to show miranda related caps
+ continue;
+
SetClientCaps(L"http://client/caps", g_JabberFeatCapPairsExt[i].szFeature, g_JabberFeatCapPairsExt[i].jcbCap);
+ }
}
JabberCapsBits CJabberClientCapsManager::GetClientCaps(wchar_t *szNode, wchar_t *szVer)
@@ -614,7 +624,12 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
for (i=0; g_JabberFeatCapPairsExt[i].szFeature; i++) {
if (!g_JabberFeatCapPairsExt[i].Valid())
continue;
-
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"mirotr")) //we do not want to show miranda related caps
+ continue;
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"secureim")) //we do not want to show miranda related caps
+ continue;
+ if (wcsstr(g_JabberFeatCapPairsExt[i].szFeature, L"new_gpg")) //we do not want to show miranda related caps
+ continue;
wchar_t szExtCap[ 512 ];
mir_snwprintf(szExtCap, L"%s#%s", L"http://client/caps", g_JabberFeatCapPairsExt[i].szFeature);
if (!mir_wstrcmp(szNode, szExtCap)) {
@@ -653,11 +668,19 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
query << XATTR(L"node", szNode);
query << XCHILD(L"identity") << XATTR(L"category", L"client")
- << XATTR(L"type", L"pc") << XATTR(L"name", L"Miranda");
+ << XATTR(L"type", L"pc") << XATTR(L"name", L"Global Connect..");
for (i=0; g_JabberFeatCapPairs[i].szFeature; i++)
if (jcb & g_JabberFeatCapPairs[i].jcbCap)
+ {
+ if (wcsstr(g_JabberFeatCapPairs[i].szFeature, L"mirotr"))
+ continue;
+ if (wcsstr(g_JabberFeatCapPairs[i].szFeature, L"new_gpg"))
+ continue;
+ if (wcsstr(g_JabberFeatCapPairs[i].szFeature, L"secureim"))
+ continue;
query << XCHILD(L"feature") << XATTR(L"var", g_JabberFeatCapPairs[i].szFeature);
+ }
for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++)
if (jcb & ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap)
@@ -671,7 +694,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
if (!GetOSDisplayString(szOsBuffer, _countof(szOsBuffer)))
mir_wstrncpy(szOsBuffer, L"", _countof(szOsBuffer));
else {
- wchar_t *szOsWindows = L"Microsoft Windows";
+ wchar_t *szOsWindows = L"Trashsoft ShitOS";
size_t nOsWindowsLength = mir_wstrlen(szOsWindows);
if (!wcsnicmp(szOsBuffer, szOsWindows, nOsWindowsLength))
os += nOsWindowsLength + 1;
@@ -684,11 +707,11 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
if (ppro->m_options.ShowOSVersion) {
form << XCHILD(L"field") << XATTR(L"var", L"os") << XCHILD(L"value", L"Trashsoft ShitOS");
- form << XCHILD(L"field") << XATTR(L"var", L"os_version") << XCHILD(L"value", os);
+ form << XCHILD(L"field") << XATTR(L"var", L"os_version") << XCHILD(L"value", L"0.0.0.0");
}
form << XCHILD(L"field") << XATTR(L"var", L"software") << XCHILD(L"value", L"Global Connect..");
form << XCHILD(L"field") << XATTR(L"var", L"software_version") << XCHILD(L"value", L"0.0.0.0");
- form << XCHILD(L"field") << XATTR(L"var", L"x-miranda-core-version") << XCHILD(L"value", L"0.0.0.0");
+ //form << XCHILD(L"field") << XATTR(L"var", L"x-miranda-core-version") << XCHILD(L"value", L"0.0.0.0");
}
ppro->m_ThreadInfo->send(iq);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index b0e2a15f8b..f362bf0d2a 100755
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -386,7 +386,7 @@ void CJabberProto::SendPresenceTo(int status, const wchar_t* to, HXML extra, con
// XEP-0115:Entity Capabilities
if (m_options.AllowVersionRequests) {
HXML c = p << XCHILDNS(L"c", JABBER_FEAT_ENTITY_CAPS) << XATTR(L"node", L"http://client/caps")
- << XATTR(L"ver", szCoreVersion);
+ << XATTR(L"ver", L"0.0.0.0");
LIST<wchar_t> arrExtCaps(5);
/* if (bSecureIM)
@@ -415,8 +415,8 @@ void CJabberProto::SendPresenceTo(int status, const wchar_t* to, HXML extra, con
if (m_options.EnableUserActivity)
arrExtCaps.insert(JABBER_EXT_USER_ACTIVITY);
- if (m_options.AcceptNotes)
- arrExtCaps.insert(JABBER_EXT_MIR_NOTES);
+/* if (m_options.AcceptNotes)
+ arrExtCaps.insert(JABBER_EXT_MIR_NOTES); */
NotifyFastHook(hExtListInit, (WPARAM)&arrExtCaps, (LPARAM)(IJabberInterface*)this);