diff options
Diffstat (limited to 'protocols/Steam')
-rw-r--r-- | protocols/Steam/src/steam_avatars.cpp | 8 | ||||
-rw-r--r-- | protocols/Steam/src/steam_contacts.cpp | 58 | ||||
-rw-r--r-- | protocols/Steam/src/steam_history.cpp | 12 | ||||
-rw-r--r-- | protocols/Steam/src/steam_login.cpp | 18 | ||||
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 10 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_polling.cpp | 16 | ||||
-rw-r--r-- | protocols/Steam/src/steam_proto.cpp | 14 | ||||
-rw-r--r-- | protocols/Steam/src/steam_utils.cpp | 2 | ||||
-rw-r--r-- | protocols/Steam/src/steam_xstatus.cpp | 10 |
10 files changed, 75 insertions, 75 deletions
diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index 8b852a8fed..0ebd7d1c8b 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -3,7 +3,7 @@ wchar_t* CSteamProto::GetAvatarFilePath(MCONTACT hContact)
{
wchar_t path[MAX_PATH];
- mir_sntprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
+ mir_snwprintf(path, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(path);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -11,16 +11,16 @@ wchar_t* CSteamProto::GetAvatarFilePath(MCONTACT hContact) ptrA steamId(getStringA(hContact, "SteamID"));
if (steamId != NULL)
- mir_sntprintf(path, MAX_PATH, L"%s\\%s.jpg", path, _A2T(steamId));
+ mir_snwprintf(path, MAX_PATH, L"%s\\%s.jpg", path, _A2T(steamId));
else
return NULL;
- return mir_tstrdup(path);
+ return mir_wstrdup(path);
}
bool CSteamProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATION &pai)
{
- ptrT path(GetAvatarFilePath(pai.hContact));
+ ptrW path(GetAvatarFilePath(pai.hContact));
if (!path)
return false;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 3cbdb66c21..1477b2d19f 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -98,19 +98,19 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) { // set common data JSONNode *node = json_get(data, "personaname"); - setTString(hContact, "Nick", ptrT(json_as_string(node))); + setTString(hContact, "Nick", ptrW(json_as_string(node))); node = json_get(data, "profileurl"); - setString(hContact, "Homepage", _T2A(ptrT(json_as_string(node)))); + setString(hContact, "Homepage", _T2A(ptrW(json_as_string(node)))); node = json_get(data, "primaryclanid"); - setString(hContact, "PrimaryClanID", _T2A(ptrT(json_as_string(node)))); + setString(hContact, "PrimaryClanID", _T2A(ptrW(json_as_string(node)))); // set name node = json_get(data, "realname"); if (node != NULL) { - std::wstring realname = (wchar_t*)ptrT(json_as_string(node)); + std::wstring realname = (wchar_t*)ptrW(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(L' ', 1); @@ -135,14 +135,14 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) // avatar bool biggerAvatars = getBool("UseBigAvatars", false); node = json_get(data, biggerAvatars ? "avatarfull" : "avatarmedium"); - std::string avatarUrl = (char*)_T2A(ptrT(json_as_string(node))); + std::string avatarUrl = (char*)_T2A(ptrW(json_as_string(node))); CheckAvatarChange(hContact, avatarUrl); // set country node = json_get(data, "loccountrycode"); if (node != NULL) { - const char *iso = ptrA(mir_u2a(ptrT(json_as_string(node)))); + const char *iso = ptrA(mir_u2a(ptrW(json_as_string(node)))); char *country = (char *)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, (WPARAM)iso, 0); setString(hContact, "Country", country); } @@ -211,18 +211,18 @@ void CSteamProto::UpdateContact(MCONTACT hContact, JSONNode *data) // playing game node = json_get(data, "gameid"); - DWORD gameId = node ? atol(_T2A(ptrT(json_as_string(node)))) : 0; + DWORD gameId = node ? atol(_T2A(ptrW(json_as_string(node)))) : 0; node = json_get(data, "gameextrainfo"); - ptrT gameInfo(json_as_string(node)); + ptrW gameInfo(json_as_string(node)); if (gameId > 0 || gameInfo[0] != '\0') { node = json_get(data, "gameserverip"); - ptrT serverIP(json_as_string(node)); + ptrW serverIP(json_as_string(node)); node = json_get(data, "gameserversteamid"); - ptrT serverID (json_as_string(node)); + ptrW serverID (json_as_string(node)); setDword(hContact, "GameID", gameId); setString(hContact, "ServerIP", _T2A(serverIP)); @@ -264,9 +264,9 @@ void CSteamProto::ContactIsRemoved(MCONTACT hContact) setDword(hContact, "DeletedTS", ::time(NULL)); SetContactStatus(hContact, ID_STATUS_OFFLINE); - ptrT nick(getTStringA(hContact, "Nick")); + ptrW nick(getTStringA(hContact, "Nick")); wchar_t message[MAX_PATH]; - mir_sntprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick); + mir_snwprintf(message, MAX_PATH, TranslateT("%s has been removed from your contact list"), nick); ShowNotification(L"Steam", message); } @@ -282,9 +282,9 @@ void CSteamProto::ContactIsFriend(MCONTACT hContact) delSetting(hContact, "DeletedTS"); delSetting(hContact, "Grant"); - ptrT nick(getTStringA(hContact, "Nick")); + ptrW nick(getTStringA(hContact, "Nick")); wchar_t message[MAX_PATH]; - mir_sntprintf(message, MAX_PATH, TranslateT("%s is back in your contact list"), nick); + mir_snwprintf(message, MAX_PATH, TranslateT("%s is back in your contact list"), nick); ShowNotification(L"Steam", message); } @@ -401,7 +401,7 @@ void CSteamProto::ProcessContact(std::map<std::string, JSONNode*>::iterator *it, if (node == NULL) return; - ptrA relationship(mir_u2a(ptrT(json_as_string(node)))); + ptrA relationship(mir_u2a(ptrW(json_as_string(node)))); if (!lstrcmpiA(relationship, "friend")) { ContactIsFriend(hContact); @@ -444,7 +444,7 @@ void CSteamProto::OnGotFriendList(const HttpResponse *response) if (node == NULL) continue; - std::string steamId = (char*)_T2A(ptrT(json_as_string(node))); + std::string steamId = (char*)_T2A(ptrW(json_as_string(node))); friends.insert(std::make_pair(steamId, child)); } } @@ -529,7 +529,7 @@ void CSteamProto::OnGotBlockList(const HttpResponse *response) break; node = json_get(child, "steamid"); - ptrA steamId(mir_u2a(ptrT(json_as_string(node)))); + ptrA steamId(mir_u2a(ptrW(json_as_string(node)))); /*MCONTACT hContact = FindContact(steamId); if (!hContact) @@ -539,7 +539,7 @@ void CSteamProto::OnGotBlockList(const HttpResponse *response) }*/ node = json_get(child, "relationship"); - ptrA relationship(mir_u2a(ptrT(json_as_string(node)))); + ptrA relationship(mir_u2a(ptrW(json_as_string(node)))); if (!lstrcmpiA(relationship, "ignoredfriend")) { @@ -571,7 +571,7 @@ void CSteamProto::OnGotUserSummaries(const HttpResponse *response) break; node = json_get(item, "steamid"); - ptrA steamId(mir_u2a(ptrT(json_as_string(node)))); + ptrA steamId(mir_u2a(ptrW(json_as_string(node)))); MCONTACT hContact = NULL; if (!IsMe(steamId)) { @@ -676,7 +676,7 @@ void CSteamProto::OnAuthRequested(const HttpResponse *response, void *arg) if (nroot != NULL) { node = json_get(nroot, "steamid"); - ptrA steamId(mir_u2a(ptrT(json_as_string(node)))); + ptrA steamId(mir_u2a(ptrW(json_as_string(node)))); MCONTACT hContact = FindContact(steamId); if (!hContact) @@ -706,7 +706,7 @@ void CSteamProto::OnPendingApproved(const HttpResponse *response, void *arg) if (json_as_int(node) == 0) { node = json_get(root, "error_text"); - debugLogA("CSteamProto::OnPendingApproved: failed to approve pending from %s (%s)", (char*)arg, ptrA(mir_utf8encodeW(ptrT(json_as_string(node))))); + debugLogA("CSteamProto::OnPendingApproved: failed to approve pending from %s (%s)", (char*)arg, ptrA(mir_utf8encodeW(ptrW(json_as_string(node))))); } } @@ -726,7 +726,7 @@ void CSteamProto::OnPendingIgnoreded(const HttpResponse *response, void *arg) if (json_as_int(node) == 0) { node = json_get(root, "error_text"); - debugLogA("CSteamProto::OnPendingApproved: failed to ignore pending from %s (%s)", (char*)arg, ptrA(mir_utf8encodeW(ptrT(json_as_string(node))))); + debugLogA("CSteamProto::OnPendingApproved: failed to ignore pending from %s (%s)", (char*)arg, ptrA(mir_utf8encodeW(ptrW(json_as_string(node))))); } } @@ -763,25 +763,25 @@ void CSteamProto::OnSearchResults(const HttpResponse *response, void *arg) ssr.hdr.flags = PSR_TCHAR; node = json_get(child, "steamid"); - ssr.hdr.id.w = mir_tstrdup(ptrT(json_as_string(node))); + ssr.hdr.id.w = mir_wstrdup(ptrW(json_as_string(node))); node = json_get(child, "personaname"); - ssr.hdr.nick.w = mir_tstrdup(ptrT(json_as_string(node))); + ssr.hdr.nick.w = mir_wstrdup(ptrW(json_as_string(node))); node = json_get(child, "realname"); if (node != NULL) { - std::wstring realname = (wchar_t*)ptrT(json_as_string(node)); + std::wstring realname = (wchar_t*)ptrW(json_as_string(node)); if (!realname.empty()) { size_t pos = realname.find(' ', 1); if (pos != std::wstring::npos) { - ssr.hdr.firstName.w = mir_tstrdup(realname.substr(0, pos).c_str()); - ssr.hdr.lastName.w = mir_tstrdup(realname.substr(pos + 1).c_str()); + ssr.hdr.firstName.w = mir_wstrdup(realname.substr(0, pos).c_str()); + ssr.hdr.lastName.w = mir_wstrdup(realname.substr(pos + 1).c_str()); } else - ssr.hdr.firstName.w = mir_tstrdup(realname.c_str()); + ssr.hdr.firstName.w = mir_wstrdup(realname.c_str()); } } @@ -833,7 +833,7 @@ void CSteamProto::OnSearchByNameStarted(const HttpResponse *response, void *arg) if (node == NULL) continue; - std::string steamId = (char*)_T2A(ptrT(json_as_string(node))); + std::string steamId = (char*)_T2A(ptrW(json_as_string(node))); steamIds.append(steamId).append(","); } json_delete(nroot); diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp index 8a16ee5bf3..61b9ae6019 100644 --- a/protocols/Steam/src/steam_history.cpp +++ b/protocols/Steam/src/steam_history.cpp @@ -28,13 +28,13 @@ void CSteamProto::OnGotConversations(const HttpResponse *response) JSONNode *session = json_at(nsessions, i); node = json_get(session, "accountid_friend"); - const char *who = AccountIdToSteamId(_wtoi64(ptrT(json_as_string(node)))); + const char *who = AccountIdToSteamId(_wtoi64(ptrW(json_as_string(node)))); node = json_get(session, "last_message"); - time_t lastMessageTS = _wtoi64(ptrT(json_as_string(node))); + time_t lastMessageTS = _wtoi64(ptrW(json_as_string(node))); /*node = json_get(session, "last_view"); - time_t last_view = _wtoi64(ptrT(json_as_string(node))); + time_t last_view = _wtoi64(ptrW(json_as_string(node))); node = json_get(session, "unread_message_count"); long unread_count = json_as_int(node);*/ @@ -79,14 +79,14 @@ void CSteamProto::OnGotHistoryMessages(const HttpResponse *response, void *arg) JSONNode *message = json_at(nmessages, i - 1); node = json_get(message, "accountid"); - const char *authorSteamId = AccountIdToSteamId(_wtoi64(ptrT(json_as_string(node)))); + const char *authorSteamId = AccountIdToSteamId(_wtoi64(ptrW(json_as_string(node)))); node = json_get(message, "message"); - ptrT text(json_as_string(node)); + ptrW text(json_as_string(node)); T2Utf szMessage(text); node = json_get(message, "timestamp"); - time_t timestamp = _wtoi64(ptrT(json_as_string(node))); + time_t timestamp = _wtoi64(ptrW(json_as_string(node))); // Ignore already existing messages if (timestamp <= m_lastMessageTS) diff --git a/protocols/Steam/src/steam_login.cpp b/protocols/Steam/src/steam_login.cpp index 15fb3d6483..8bf65f6f30 100644 --- a/protocols/Steam/src/steam_login.cpp +++ b/protocols/Steam/src/steam_login.cpp @@ -30,11 +30,11 @@ bool CSteamProto::Relogin() if (root != NULL) { JSONNode *node = json_get(root, "error"); - ptrT error(json_as_string(node)); - if (!mir_tstrcmpi(error, L"OK")) + ptrW error(json_as_string(node)); + if (!mir_wstrcmpi(error, L"OK")) { node = json_get(root, "umqid"); - setString("UMQID", ptrA(mir_u2a(ptrT(json_as_string(node))))); + setString("UMQID", ptrA(mir_u2a(ptrW(json_as_string(node))))); node = json_get(root, "message"); setDword("MessageID", json_as_int(node)); @@ -148,10 +148,10 @@ void CSteamProto::DeleteAuthSettings() void CSteamProto::OnAuthorizationError(const JSONNode &node) { std::string message = node["message"].as_string(); - ptrT messageT(mir_utf8decodeT(message.c_str())); + ptrW messageT(mir_utf8decodeW(message.c_str())); debugLogA("CSteamProto::OnAuthorizationError: %s", message.c_str()); - if (!mir_tstrcmpi(messageT, L"Incorrect login.")) + if (!mir_wstrcmpi(messageT, L"Incorrect login.")) { // We can't continue with incorrect login/password DeleteAuthSettings(); @@ -367,8 +367,8 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) JSONROOT root(response->pData); JSONNode *node = json_get(root, "error"); - ptrT error(json_as_string(node)); - if (mir_tstrcmpi(error, L"OK")) + ptrW error(json_as_string(node)); + if (mir_wstrcmpi(error, L"OK")) { // Probably expired TokenSecret HandleTokenExpired(); @@ -376,14 +376,14 @@ void CSteamProto::OnLoggedOn(const HttpResponse *response) } node = json_get(root, "umqid"); - setString("UMQID", ptrA(mir_u2a(ptrT(json_as_string(node))))); + setString("UMQID", ptrA(mir_u2a(ptrW(json_as_string(node))))); node = json_get(root, "message"); setDword("MessageID", json_as_int(node)); if (m_lastMessageTS <= 0) { node = json_get(root, "utc_timestamp"); - time_t timestamp = _wtoi64(ptrT(json_as_string(node))); + time_t timestamp = _wtoi64(ptrW(json_as_string(node))); setDword("LastMessageTS", timestamp); } diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index bfcde18b1d..d399f7ff47 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -38,8 +38,8 @@ void CSteamProto::OnMessageSent(const HttpResponse *response, void *arg) {
SendMessageParam *param = (SendMessageParam*)arg;
- ptrT error(mir_tstrdup(TranslateT("Unknown error")));
- ptrT steamId(getTStringA(param->hContact, "SteamID"));
+ ptrW error(mir_wstrdup(TranslateT("Unknown error")));
+ ptrW steamId(getTStringA(param->hContact, "SteamID"));
time_t timestamp = NULL;
if (ResponseHttpOk(response))
@@ -52,15 +52,15 @@ void CSteamProto::OnMessageSent(const HttpResponse *response, void *arg) node = json_get(root, "utc_timestamp");
if (node)
{
- timestamp = atol(ptrA(mir_t2a(ptrT(json_as_string(node)))));
+ timestamp = atol(ptrA(mir_u2a(ptrW(json_as_string(node)))));
if (timestamp > getDword("LastMessageTS", 0))
setDword("LastMessageTS", timestamp);
}
}
- if (mir_tstrcmpi(error, L"OK") != 0)
+ if (mir_wstrcmpi(error, L"OK") != 0)
{
- ptrA errorA(mir_t2a(error));
+ ptrA errorA(mir_u2a(error));
debugLogA("CSteamProto::OnMessageSent: failed to send message for %s (%s)", steamId, errorA);
ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, param->hMessage, (LPARAM)errorA);
}
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index 00f933a804..cc62799a62 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -26,7 +26,7 @@ void CSteamOptionsMain::OnInitDialog() void CSteamOptionsMain::OnApply()
{
wchar_t *group = m_group.GetText();
- if (mir_tstrlen(group) > 0 && !Clist_GroupExists(group))
+ if (mir_wstrlen(group) > 0 && !Clist_GroupExists(group))
Clist_GroupCreate(0, group);
if (m_proto->IsOnline())
diff --git a/protocols/Steam/src/steam_polling.cpp b/protocols/Steam/src/steam_polling.cpp index 22896647d8..6774bb60ab 100644 --- a/protocols/Steam/src/steam_polling.cpp +++ b/protocols/Steam/src/steam_polling.cpp @@ -14,13 +14,13 @@ void CSteamProto::ParsePollData(JSONNode *data) break; node = json_get(item, "steamid_from"); - ptrA steamId(mir_t2a(ptrT(json_as_string(node)))); + ptrA steamId(mir_u2a(ptrW(json_as_string(node)))); node = json_get(item, "utc_timestamp"); - time_t timestamp = atol(ptrA(mir_t2a(ptrT(json_as_string(node))))); + time_t timestamp = atol(ptrA(mir_u2a(ptrW(json_as_string(node))))); node = json_get(item, "type"); - ptrT type(json_as_string(node)); + ptrW type(json_as_string(node)); if (!lstrcmpi(type, L"saytext") || !lstrcmpi(type, L"emote") || !lstrcmpi(type, L"my_saytext") || !lstrcmpi(type, L"my_emote")) { @@ -29,7 +29,7 @@ void CSteamProto::ParsePollData(JSONNode *data) continue; node = json_get(item, "text"); - ptrT text(json_as_string(node)); + ptrW text(json_as_string(node)); T2Utf szMessage(text); PROTORECVEVENT recv = { 0 }; @@ -61,7 +61,7 @@ void CSteamProto::ParsePollData(JSONNode *data) if (IsMe(steamId)) { node = json_get(item, "persona_name"); - setTString("Nick", ptrT(json_as_string(node))); + setTString("Nick", ptrW(json_as_string(node))); if (status == -1 || status == ID_STATUS_OFFLINE) continue; @@ -85,7 +85,7 @@ void CSteamProto::ParsePollData(JSONNode *data) SetContactStatus(hContact, status); node = json_get(item, "persona_name"); - setTString(hContact, "Nick", ptrT(json_as_string(node))); + setTString(hContact, "Nick", ptrW(json_as_string(node))); // todo: find difference between state changing and info changing steamIds.append(steamId).append(","); @@ -217,13 +217,13 @@ void CSteamProto::PollingThread(void*) { JSONNode *node = json_get(root, "error"); if (node) { - ptrT error(json_as_string(node)); + ptrW error(json_as_string(node)); if (!lstrcmpi(error, L"OK")) { // Remember last message timestamp node = json_get(root, "utc_timestamp"); - time_t timestamp = _wtoi64(ptrT(json_as_string(node))); + time_t timestamp = _wtoi64(ptrW(json_as_string(node))); if (timestamp > getDword("LastMessageTS", 0)) setDword("LastMessageTS", timestamp); diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp index 9eadb0fb42..964225abcc 100644 --- a/protocols/Steam/src/steam_proto.cpp +++ b/protocols/Steam/src/steam_proto.cpp @@ -18,7 +18,7 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) GetModuleFileName(g_hInstance, filePath, MAX_PATH); wchar_t sectionName[100]; - mir_sntprintf(sectionName, L"%s/%s", LPGENW("Protocols"), MODULEW); + mir_snwprintf(sectionName, L"%s/%s", LPGENW("Protocols"), MODULEW); char settingName[100]; mir_snprintf(settingName, "%s_%s", MODULE, "main"); @@ -66,7 +66,7 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName) // netlib support wchar_t name[128]; - mir_sntprintf(name, TranslateT("%s connection"), m_tszUserName); + mir_snwprintf(name, TranslateT("%s connection"), m_tszUserName); NETLIBUSER nlu = { sizeof(nlu) }; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; @@ -228,7 +228,7 @@ HANDLE CSteamProto::SearchBasic(const wchar_t* id) return 0; ptrA token(getStringA("TokenSecret")); - ptrA steamId(mir_t2a(id)); + ptrA steamId(mir_u2a(id)); PushRequest( new GetUserSummariesRequest(token, steamId), @@ -245,7 +245,7 @@ HANDLE CSteamProto::SearchByName(const wchar_t* nick, const wchar_t* firstName, // Combine all fields to single text wchar_t keywordsT[200]; - mir_sntprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); + mir_snwprintf(keywordsT, L"%s %s %s", nick, firstName, lastName); ptrA token(getStringA("TokenSecret")); ptrA keywords(mir_utf8encodeW(keywordsT)); @@ -338,7 +338,7 @@ int CSteamProto::SetStatus(int new_status) } else { - ptrA username(mir_urlEncode(ptrA(mir_utf8encodeT(getTStringA("Username"))))); + ptrA username(mir_urlEncode(ptrA(mir_utf8encodeW(getTStringA("Username"))))); if (username == NULL || username[0] == '\0') { m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; @@ -371,8 +371,8 @@ void __cdecl CSteamProto::GetAwayMsgThread(void *arg) // if contact has no status message, get xstatus message if (message.IsEmpty()) { - ptrT xStatusName(getTStringA(hContact, "XStatusName")); - ptrT xStatusMsg(getTStringA(hContact, "XStatusMsg")); + ptrW xStatusName(getTStringA(hContact, "XStatusName")); + ptrW xStatusMsg(getTStringA(hContact, "XStatusMsg")); if (xStatusName) message.AppendFormat(L"%s: %s", xStatusName, xStatusMsg); diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index 264afff378..0fb7f4474d 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -192,7 +192,7 @@ INT_PTR __cdecl CSteamProto::OnGetEventTextChatStates(WPARAM, LPARAM lParam) if (pdbEvent->dbei->cbBlob > 0) {
if (pdbEvent->dbei->pBlob[0] == STEAM_DB_EVENT_CHATSTATES_GONE) {
if (pdbEvent->datatype == DBVT_WCHAR)
- return (INT_PTR)mir_tstrdup(TranslateT("closed chat session"));
+ return (INT_PTR)mir_wstrdup(TranslateT("closed chat session"));
else if (pdbEvent->datatype == DBVT_ASCIIZ)
return (INT_PTR)mir_strdup(Translate("closed chat session"));
}
diff --git a/protocols/Steam/src/steam_xstatus.cpp b/protocols/Steam/src/steam_xstatus.cpp index 7a42c3f4e3..8f8cdd015c 100644 --- a/protocols/Steam/src/steam_xstatus.cpp +++ b/protocols/Steam/src/steam_xstatus.cpp @@ -44,24 +44,24 @@ INT_PTR CSteamProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam) if (status < 1) return 1; - ptrT title; + ptrW title; if (pData->flags & CSSF_DEFAULT_NAME) - title = mir_tstrdup(TranslateT("Playing")); + title = mir_wstrdup(TranslateT("Playing")); else title = getTStringA(hContact, "XStatusName"); if (pData->flags & CSSF_UNICODE) - mir_tstrncpy(pData->ptszName, title, STATUS_TITLE_MAX); + mir_wstrncpy(pData->ptszName, title, STATUS_TITLE_MAX); else mir_strncpy(pData->pszName, _T2A(title), STATUS_TITLE_MAX); } // fill status message member if (pData->flags & CSSF_MASK_MESSAGE) { - ptrT message(getTStringA(hContact, "XStatusMsg")); + ptrW message(getTStringA(hContact, "XStatusMsg")); if (pData->flags & CSSF_UNICODE) - mir_tstrncpy(pData->ptszMessage, message, STATUS_DESC_MAX); + mir_wstrncpy(pData->ptszMessage, message, STATUS_DESC_MAX); else mir_strncpy(pData->pszMessage, _T2A(message), STATUS_DESC_MAX); } |