diff options
Diffstat (limited to 'protocols/MinecraftDynmap/src')
-rw-r--r-- | protocols/MinecraftDynmap/src/chat.cpp | 16 | ||||
-rw-r--r-- | protocols/MinecraftDynmap/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/MinecraftDynmap/src/proto.cpp | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp index 4317adf91a..d41748bd84 100644 --- a/protocols/MinecraftDynmap/src/chat.cpp +++ b/protocols/MinecraftDynmap/src/chat.cpp @@ -27,8 +27,8 @@ void MinecraftDynmapProto::UpdateChat(const char *name, const char *message, con std::string smessage = message; utils::text::replace_all(&smessage, "%", "%%"); - ptrT tmessage(mir_a2t_cp(smessage.c_str(), CP_UTF8)); - ptrT tname(mir_a2t_cp(name, CP_UTF8)); + ptrW tmessage(mir_a2u_cp(smessage.c_str(), CP_UTF8)); + ptrW tname(mir_a2u_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -37,7 +37,7 @@ void MinecraftDynmapProto::UpdateChat(const char *name, const char *message, con if (tname == NULL) { gcd.iType = GC_EVENT_INFORMATION; - tname = mir_tstrdup(TranslateT("Server")); + tname = mir_wstrdup(TranslateT("Server")); gce.bIsMe = false; } else gce.bIsMe = (m_nick == name); @@ -61,7 +61,7 @@ int MinecraftDynmapProto::OnChatEvent(WPARAM, LPARAM lParam) { case GC_USER_MESSAGE: { - std::string text = mir_t2a_cp(hook->ptszText,CP_UTF8); + std::string text = mir_u2a_cp(hook->ptszText,CP_UTF8); // replace %% back to %, because chat automatically does this to sent messages utils::text::replace_all(&text, "%%", "%"); @@ -88,7 +88,7 @@ int MinecraftDynmapProto::OnChatEvent(WPARAM, LPARAM lParam) void MinecraftDynmapProto::AddChatContact(const char *name) { - ptrT tname(mir_a2t_cp(name, CP_UTF8)); + ptrW tname(mir_a2u_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_JOIN }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -108,7 +108,7 @@ void MinecraftDynmapProto::AddChatContact(const char *name) void MinecraftDynmapProto::DeleteChatContact(const char *name) { - ptrT tname(mir_a2t_cp(name, CP_UTF8)); + ptrW tname(mir_a2u_cp(name, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_PART }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -123,7 +123,7 @@ void MinecraftDynmapProto::DeleteChatContact(const char *name) INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) { - ptrT tszTitle(mir_a2t_cp(m_title.c_str(), CP_UTF8)); + ptrW tszTitle(mir_a2u_cp(m_title.c_str(), CP_UTF8)); // Create the group chat session GCSESSION gcw = {sizeof(gcw)}; @@ -155,7 +155,7 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress) void MinecraftDynmapProto::SetTopic(const char *topic) { - ptrT ttopic(mir_a2t_cp(topic, CP_UTF8)); + ptrW ttopic(mir_a2u_cp(topic, CP_UTF8)); GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_TOPIC }; GCEVENT gce = { sizeof(gce), &gcd }; diff --git a/protocols/MinecraftDynmap/src/dialogs.cpp b/protocols/MinecraftDynmap/src/dialogs.cpp index 28c428e30b..3f8c6fc4c9 100644 --- a/protocols/MinecraftDynmap/src/dialogs.cpp +++ b/protocols/MinecraftDynmap/src/dialogs.cpp @@ -64,7 +64,7 @@ static BOOL StoreDBCheckState(MinecraftDynmapProto* ppro, HWND hwnd, int idCtrl, static void LoadDBText(MinecraftDynmapProto* ppro, HWND hwnd, int idCtrl, const char* szSetting) { - ptrT tstr(db_get_tsa(NULL, ppro->m_szModuleName, szSetting)); + ptrW tstr(db_get_tsa(NULL, ppro->m_szModuleName, szSetting)); if (tstr) SetDlgItemText(hwnd, idCtrl, tstr); } diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp index 71c7932685..7d2c845e55 100644 --- a/protocols/MinecraftDynmap/src/proto.cpp +++ b/protocols/MinecraftDynmap/src/proto.cpp @@ -46,12 +46,12 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t NETLIBUSER nlu = {sizeof(nlu)}; nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; nlu.szSettingsModule = m_szModuleName; - mir_sntprintf(descr, TranslateT("%s server connection"), m_tszUserName); + mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName); nlu.ptszDescriptiveName = descr; m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); if (m_hNetlibUser == NULL) { wchar_t error[200]; - mir_sntprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); + mir_snwprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName); MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR); } |