summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /protocols/Twitter/src/chat.cpp
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/chat.cpp')
-rw-r--r--protocols/Twitter/src/chat.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp
index 940d34eee5..8a7d155f26 100644
--- a/protocols/Twitter/src/chat.cpp
+++ b/protocols/Twitter/src/chat.cpp
@@ -29,25 +29,25 @@ void TwitterProto::UpdateChat(const twitter_user &update)
gce.pDest = &gcd;
gce.bIsMe = (update.username == twit_.get_username());
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszUID = mir_a2t(update.username.c_str());
+ gce.ptszUID = mir_a2u(update.username.c_str());
//TODO: write code here to replace % with %% in update.status.text (which is a std::string)
std::string chatText = update.status.text;
replaceAll(chatText, "%", "%%");
- gce.ptszText = mir_a2t_cp(chatText.c_str(), CP_UTF8);
- //gce.ptszText = mir_a2t_cp(update.status.text.c_str(),CP_UTF8);
+ gce.ptszText = mir_a2u_cp(chatText.c_str(), CP_UTF8);
+ //gce.ptszText = mir_a2u_cp(update.status.text.c_str(),CP_UTF8);
gce.time = static_cast<DWORD>(update.status.time);
DBVARIANT nick;
MCONTACT hContact = UsernameToHContact(update.username.c_str());
if (hContact && !db_get_s(hContact, "CList", "MyHandle", &nick)) {
- gce.ptszNick = mir_a2t(nick.pszVal);
+ gce.ptszNick = mir_a2u(nick.pszVal);
db_free(&nick);
}
else
- gce.ptszNick = mir_a2t(update.username.c_str());
+ gce.ptszNick = mir_a2u(update.username.c_str());
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
@@ -78,7 +78,7 @@ int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam)
case GC_USER_PRIVMESS:
{
- ptrA text(mir_t2a(hook->ptszUID));
+ ptrA text(mir_u2a(hook->ptszUID));
CallService(MS_MSG_SENDMESSAGE, WPARAM(UsernameToHContact(text)), 0);
}
break;
@@ -93,8 +93,8 @@ void TwitterProto::AddChatContact(const char *name, const char *nick)
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_JOIN };
GCEVENT gce = { sizeof(gce), &gcd };
gce.time = DWORD(time(0));
- gce.ptszNick = mir_a2t(nick ? nick : name);
- gce.ptszUID = mir_a2t(name);
+ gce.ptszNick = mir_a2u(nick ? nick : name);
+ gce.ptszUID = mir_a2u(name);
gce.ptszStatus = L"Normal";
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));
@@ -107,7 +107,7 @@ void TwitterProto::DeleteChatContact(const char *name)
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_PART };
GCEVENT gce = { sizeof(gce), &gcd };
gce.time = DWORD(time(0));
- gce.ptszNick = mir_a2t(name);
+ gce.ptszNick = mir_a2u(name);
gce.ptszUID = gce.ptszNick;
CallServiceSync(MS_GC_EVENT, 0, reinterpret_cast<LPARAM>(&gce));