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/Omegle/src | |
parent | 54ad7c456325b4c7fd639ef2d7cca7d5aef81c05 (diff) |
useless structure GCDEST finally removed
Diffstat (limited to 'protocols/Omegle/src')
-rw-r--r-- | protocols/Omegle/src/chat.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index eb6c613875..4967e06727 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -27,13 +27,12 @@ void OmegleProto::UpdateChat(const wchar_t *name, const wchar_t *message, bool a std::wstring smessage = message;
utils::text::treplace_all(&smessage, L"%", L"%%");
- GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE };
- GCEVENT gce = { &gcd };
+ GCEVENT gce = { m_szModuleName, m_tszUserName, GC_EVENT_MESSAGE };
gce.time = ::time(NULL);
gce.ptszText = smessage.c_str();
if (name == NULL) {
- gcd.iType = GC_EVENT_INFORMATION;
+ gce.iType = GC_EVENT_INFORMATION;
name = TranslateT("Server");
gce.bIsMe = false;
}
@@ -51,10 +50,10 @@ int OmegleProto::OnChatEvent(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;
- switch (hook->pDest->iType)
+ switch (hook->iType)
{
case GC_USER_MESSAGE:
{
@@ -228,8 +227,7 @@ Chat_Event(WINDOW_CLEARLOG,&gce); void OmegleProto::AddChatContact(const wchar_t *name)
{
- GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_JOIN };
- GCEVENT gce = { &gcd };
+ GCEVENT gce = { m_szModuleName, m_tszUserName, GC_EVENT_JOIN };
gce.time = DWORD(time(0));
gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = name;
@@ -250,8 +248,7 @@ void OmegleProto::AddChatContact(const wchar_t *name) void OmegleProto::DeleteChatContact(const wchar_t *name)
{
- GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_PART };
- GCEVENT gce = { &gcd };
+ GCEVENT gce = { m_szModuleName, m_tszUserName, GC_EVENT_PART };
gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = name;
gce.ptszUID = gce.ptszNick;
@@ -287,8 +284,7 @@ INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress) void OmegleProto::SetTopic(const wchar_t *topic)
{
- GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_TOPIC };
- GCEVENT gce = { &gcd };
+ GCEVENT gce = { m_szModuleName, m_tszUserName, GC_EVENT_TOPIC };
gce.time = ::time(NULL);
if (topic == NULL)
|