summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-11 20:31:15 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-11 20:31:15 +0300
commit53b41c5180eaa9d01b7a57d6ccd4602384a1aebb (patch)
tree7f3aa8dc4dcfa99abc4619d7481b5a12a89120a9 /protocols
parentc7c3b1a4c09ed2e4c4d0a6ba37e700f84874dba0 (diff)
ICQ: missing PS_LEAVECHAT service added
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/groupchats.cpp9
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp2
-rw-r--r--protocols/ICQ-WIM/src/proto.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp
index 9f9e314811..c45eaecfa4 100644
--- a/protocols/ICQ-WIM/src/groupchats.cpp
+++ b/protocols/ICQ-WIM/src/groupchats.cpp
@@ -36,6 +36,15 @@ SESSION_INFO* CIcqProto::CreateGroupChat(const wchar_t *pwszId, const wchar_t *p
return si;
}
+INT_PTR CIcqProto::OnLeaveChat(WPARAM hContact, LPARAM)
+{
+ CMStringW wszId(GetUserId(hContact));
+ if (auto *si = Chat_Find(wszId, m_szModuleName))
+ LeaveDestroyChat(si);
+
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CIcqProto::LoadChatInfo(SESSION_INFO *si)
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index aec09ffb55..b4239637d6 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -91,6 +91,8 @@ CIcqProto::CIcqProto(const char *aProtoName, const wchar_t *aUserName) :
gcr.pszModule = m_szModuleName;
Chat_Register(&gcr);
+ CreateProtoService(PS_LEAVECHAT, &CIcqProto::OnLeaveChat);
+
// avatars
CreateDirectoryTreeW(GetAvatarPath());
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h
index 1cf5f4381b..fdd552a1cc 100644
--- a/protocols/ICQ-WIM/src/proto.h
+++ b/protocols/ICQ-WIM/src/proto.h
@@ -381,6 +381,7 @@ class CIcqProto : public PROTO<CIcqProto>
INT_PTR __cdecl GotoInbox(WPARAM, LPARAM);
INT_PTR __cdecl UploadGroups(WPARAM, LPARAM);
+ INT_PTR __cdecl OnLeaveChat(WPARAM, LPARAM);
INT_PTR __cdecl OnMenuLoadHistory(WPARAM, LPARAM);
////////////////////////////////////////////////////////////////////////////////////////