diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-19 14:12:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-19 14:13:06 +0300 |
commit | e254312f9a660c83081ce2062ab14ba3c3614089 (patch) | |
tree | 324dff386c4b394ed4dc0f9b912ce3332bd94e84 /protocols/FacebookRM/src/chat.cpp | |
parent | 54ad7c456325b4c7fd639ef2d7cca7d5aef81c05 (diff) |
useless structure GCDEST finally removed
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r-- | protocols/FacebookRM/src/chat.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 880077eb7d..966a7a0d76 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -35,8 +35,7 @@ void FacebookProto::UpdateChat(const char *chat_id, const char *id, const char * ptrW ttext(mir_a2u_cp(smessage.c_str(), CP_UTF8)); ptrW tchat_id(mir_a2u(chat_id)); - GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_MESSAGE }; - GCEVENT gce = { &gcd }; + GCEVENT gce = { m_szModuleName, tchat_id, GC_EVENT_MESSAGE }; gce.ptszText = ttext; gce.time = timestamp ? timestamp : ::time(NULL); if (id != NULL) @@ -64,19 +63,19 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) { GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam); - if (mir_strcmp(hook->pDest->pszModule, m_szModuleName)) + if (mir_strcmp(hook->pszModule, m_szModuleName)) return 0; // Ignore for special chatrooms - if (!mir_wstrcmp(hook->pDest->ptszID, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))) + if (!mir_wstrcmp(hook->ptszID, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))) return 0; - switch (hook->pDest->iType) + switch (hook->iType) { case GC_USER_MESSAGE: { std::string msg = _T2A(hook->ptszText, CP_UTF8); - std::string chat_id = _T2A(hook->pDest->ptszID, CP_UTF8); + std::string chat_id = _T2A(hook->ptszID, CP_UTF8); if (isOnline()) { debugLogA(" > Chat - Outgoing message"); @@ -169,9 +168,7 @@ void FacebookProto::AddChatContact(const char *chat_id, const chatroom_participa ptrW tnick(mir_a2u_cp(user.nick.c_str(), CP_UTF8)); ptrW tid(mir_a2u(user.user_id.c_str())); - GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_JOIN }; - GCEVENT gce = { &gcd }; - gce.pDest = &gcd; + GCEVENT gce = { m_szModuleName, tchat_id, GC_EVENT_JOIN }; gce.dwFlags = addToLog ? GCEF_ADDTOLOG : 0; gce.ptszNick = tnick; gce.ptszUID = tid; @@ -208,8 +205,7 @@ void FacebookProto::RemoveChatContact(const char *chat_id, const char *id, const ptrW tnick(mir_a2u_cp(name, CP_UTF8)); ptrW tid(mir_a2u(id)); - GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_PART }; - GCEVENT gce = { &gcd }; + GCEVENT gce = { m_szModuleName, tchat_id, GC_EVENT_PART }; gce.dwFlags = GCEF_ADDTOLOG; gce.ptszNick = tnick; gce.ptszUID = tid; @@ -418,8 +414,7 @@ void FacebookProto::UpdateNotificationsChatRoom(facebook_notification *notificat ptrW idT(mir_wstrdup(_A2W(FACEBOOK_NOTIFICATIONS_CHATROOM))); ptrW messageT(mir_a2u_cp(message.c_str(), CP_UTF8)); - GCDEST gcd = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; - GCEVENT gce = { &gcd }; + GCEVENT gce = { m_szModuleName, _A2W(FACEBOOK_NOTIFICATIONS_CHATROOM), GC_EVENT_MESSAGE }; gce.ptszText = messageT; gce.time = notification->time ? notification->time : ::time(NULL); gce.bIsMe = false; |