summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/dialogs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-20 13:23:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-20 13:23:20 +0000
commitd7382326906b9f3bdd66704dd1b41f9299c1daa6 (patch)
treeccc0696d8ec511b4894cf2b20971b9f7fc625689 /protocols/Gadu-Gadu/src/dialogs.cpp
parent874cdbe42cfe376f0e72fd5fe6bad0d2f75f4ee3 (diff)
protocol helper for detecting chats: isChatRoom
git-svn-id: http://svn.miranda-ng.org/main/trunk@5428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/dialogs.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index 55d531e6af..ffc5c96f4e 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -907,9 +907,13 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
- char* szProto = GetContactProto((HANDLE)lParam);
- if ((szProto == NULL || strcmp(szProto, m_szModuleName)) && lParam || lParam && db_get_b((HANDLE)lParam, m_szModuleName, "ChatRoom", 0))
- return 0;
+ HANDLE hContact = (HANDLE)lParam;
+ char* szProto = GetContactProto(hContact);
+ if (szProto == NULL)
+ return 0;
+
+ if (hContact && (strcmp(szProto, m_szModuleName) || isChatRoom(hContact)))
+ return 0;
// Here goes init
OPTIONSDIALOGPAGE odp = { sizeof(odp) };