summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-01-25 14:24:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-01-25 14:24:53 +0300
commit9cca190bc3022311915eb1e95b3cc3bb89aed328 (patch)
treef0e27680e6dae1a0df044ae59ad86ccac59d0db7 /protocols/Gadu-Gadu
parentcf83f17e172253faf44737b8f4c27945e9f671e5 (diff)
massive code cleaning:
- GCHOOK structure normalized (i.e. inlined SESSION_INFO fields replaced with a reference to SESSION_INFO); - fake CMsgDialog declaration added to m_srmm_int.h, thus duplicated declarations in plugins aren't needed anymore - other minor changes
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/gg.h2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp16
2 files changed, 8 insertions, 10 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h
index 2da3bbb811..21a763db6a 100644
--- a/protocols/Gadu-Gadu/src/gg.h
+++ b/protocols/Gadu-Gadu/src/gg.h
@@ -64,7 +64,7 @@
#include <m_avatars.h>
#include <m_xml.h>
#include <m_json.h>
-#include <m_chat.h>
+#include <m_chat_int.h>
#include <m_popup.h>
#include <win2k.h>
#include <m_folders.h>
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 63a2547cf7..7d09dfc691 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -112,17 +112,15 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
uin_t uin;
// Check if we got our protocol, and fields are set
- if (!gch
- || !gch->ptszID
- || !gch->pszModule
- || mir_strcmpi(gch->pszModule, m_szModuleName)
+ if (!gch || !gch->si->ptszID || !gch->si->pszModule
+ || mir_strcmpi(gch->si->pszModule, m_szModuleName)
|| !(uin = getDword(GG_KEY_UIN, 0))
- || !(chat = gc_lookup(gch->ptszID)))
+ || !(chat = gc_lookup(gch->si->ptszID)))
return 0;
// Window terminated (Miranda exit)
if (gch->iType == SESSION_TERMINATE) {
- debugLogW(L"gc_event(): Terminating chat %x, id %s from chat window...", chat, gch->ptszID);
+ debugLogW(L"gc_event(): Terminating chat %x, id %s from chat window...", chat, gch->si->ptszID);
// Destroy chat entry
free(chat->recipients);
list_remove(&chats, chat, 1);
@@ -132,7 +130,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
MCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getWString(hContact, "ChatRoomID", &dbv)) {
- if (dbv.pwszVal && !mir_wstrcmp(gch->ptszID, dbv.pwszVal))
+ if (dbv.pwszVal && !mir_wstrcmp(gch->si->ptszID, dbv.pwszVal))
db_delete_contact(hContact);
db_free(&dbv);
}
@@ -148,7 +146,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
DBVARIANT dbv;
GCEVENT gce = { m_szModuleName, 0, GC_EVENT_MESSAGE };
- gce.pszID.w = gch->ptszID;
+ gce.pszID.w = gch->si->ptszID;
gce.pszUID.w = id;
gce.pszText.w = gch->ptszText;
wchar_t* nickT;
@@ -169,7 +167,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
gce.time = time(0);
gce.bIsMe = 1;
gce.dwFlags = GCEF_ADDTOLOG;
- debugLogW(L"gc_event(): Sending conference message to room %s, \"%s\".", gch->ptszID, gch->ptszText);
+ debugLogW(L"gc_event(): Sending conference message to room %s, \"%s\".", gch->si->ptszID, gch->ptszText);
Chat_Event(&gce);
mir_free(nickT);