summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/groupchat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-01-25 18:34:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-01-25 18:34:51 +0300
commit9885bf54f788e831a80c76001340aa68d31d2aaa (patch)
tree420ab4aa5bf868d4193c965668ae68e5855093b7 /protocols/Gadu-Gadu/src/groupchat.cpp
parentc9d99d1525e2e9374ed0fa10837e82e76c3b9216 (diff)
Group chats: ChatRoomID setting replaced with real protocol id
Diffstat (limited to 'protocols/Gadu-Gadu/src/groupchat.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 6eac366e71..81deec7393 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -114,7 +114,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
// Check if we got our protocol, and fields are set
if (!gch || !gch->si->ptszID || !gch->si->pszModule
|| mir_strcmpi(gch->si->pszModule, m_szModuleName)
- || !(uin = getDword(GG_KEY_UIN, 0))
+ || !(uin = getDword(gch->si->hContact, GG_KEY_UIN))
|| !(chat = gc_lookup(gch->si->ptszID)))
return 0;
@@ -126,16 +126,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
list_remove(&chats, chat, 1);
// Remove contact from contact list (duh!) should be done by chat.dll !!
- for (MCONTACT hContact = db_find_first(); hContact; ) {
- MCONTACT hNext = db_find_next(hContact);
- DBVARIANT dbv;
- if (!getWString(hContact, "ChatRoomID", &dbv)) {
- if (dbv.pwszVal && !mir_wstrcmp(gch->si->ptszID, dbv.pwszVal))
- db_delete_contact(hContact);
- db_free(&dbv);
- }
- hContact = hNext;
- }
+ db_delete_contact(gch->si->hContact);
return 1;
}