diff options
author | George Hazan <ghazan@miranda.im> | 2019-08-26 13:41:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-08-26 13:41:45 +0300 |
commit | cb2efce1a4fe9c89c5fef63b3aca63f3e63983fc (patch) | |
tree | aee121fae12956a856e6cd72f2a45d3e4757cd1a /protocols | |
parent | c43051a42bfd2457f6cf5fca9698db0d55b73993 (diff) |
obsolete services removed from core & replaced with functions
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/gateway.cpp | 6 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_caps.cpp | 9 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq_handlers.cpp | 8 |
3 files changed, 10 insertions, 13 deletions
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp index fc760cb980..8d17a8ad5b 100644 --- a/protocols/Discord/src/gateway.cpp +++ b/protocols/Discord/src/gateway.cpp @@ -364,14 +364,14 @@ void CDiscordProto::GatewaySendIdentify() return; } - wchar_t wszOs[256]; - GetOSDisplayString(wszOs, _countof(wszOs)); + char szOs[256]; + OS_GetDisplayString(szOs, _countof(szOs)); char szVersion[256]; Miranda_GetVersionText(szVersion, _countof(szVersion)); JSONNode props; props.set_name("properties"); - props << WCHAR_PARAM("os", wszOs) << CHAR_PARAM("browser", "Chrome") << CHAR_PARAM("device", szVersion) + props << CHAR_PARAM("os", szOs) << CHAR_PARAM("browser", "Chrome") << CHAR_PARAM("device", szVersion) << CHAR_PARAM("referrer", "https://miranda-ng.org") << CHAR_PARAM("referring_domain", "miranda-ng.org"); JSONNode payload; payload.set_name("d"); diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index 5a6114e426..f23ddbd213 100755 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -112,12 +112,12 @@ void CJabberProto::AddDefaultCaps() if (it.Valid())
myCaps |= it.jcbCap;
- wchar_t szOsBuffer[256]; szOsBuffer[0] = 0;
- GetOSDisplayString(szOsBuffer, _countof(szOsBuffer));
+ char szOsBuffer[256];
+ OS_GetDisplayString(szOsBuffer, _countof(szOsBuffer));
CJabberClientPartialCaps *pCaps = m_clientCapsManager.SetOwnCaps(JABBER_CAPS_MIRANDA_NODE, __VERSION_STRING_DOTS, myCaps);
pCaps->m_szOs = mir_strdup("Microsoft Windows");
- pCaps->m_szOsVer = mir_utf8encodeW(szOsBuffer);
+ pCaps->m_szOsVer = mir_strdup(szOsBuffer);
pCaps->m_szSoft = mir_strdup("Miranda NG Jabber Protocol");
pCaps->m_szSoftMir = mir_strdup(szCoreVersion);
}
@@ -497,9 +497,6 @@ void CJabberClientCapsManager::UpdateFeatHash() feat_buf.AppendChar('<');
}
- wchar_t szOsBuffer[256]; szOsBuffer[0] = 0;
- GetOSDisplayString(szOsBuffer, _countof(szOsBuffer));
-
feat_buf.Append("software_version"); feat_buf.AppendChar('<');
feat_buf.Append(__VERSION_STRING_DOTS); feat_buf.AppendChar('<');
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index d443d4fdc9..ed0ace2ff0 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -42,10 +42,10 @@ BOOL CJabberProto::OnIqRequestVersion(const TiXmlElement*, CJabberIqInfo *pInfo) query << XCHILD("version", szCoreVersion);
if (m_bShowOSVersion) {
- wchar_t os[256] = { 0 };
- if (!GetOSDisplayString(os, _countof(os)))
- mir_wstrncpy(os, L"Microsoft Windows", _countof(os));
- query << XCHILD("os", T2Utf(os));
+ char os[256];
+ if (!OS_GetDisplayString(os, _countof(os)))
+ mir_strncpy(os, "Microsoft Windows", _countof(os));
+ query << XCHILD("os", os);
}
m_ThreadInfo->send(iq);
|