From 925c04de5ee370511fe1c09d42ba8c4589c7d2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 19 Dec 2015 21:24:11 +0000 Subject: Steam: Support for receiving "user left conversation" events (like jabber has) Miranda is NOT sending this event, maybe in future if there is exists such request from mobile/web steam. git-svn-id: http://svn.miranda-ng.org/main/trunk@15903 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_utils.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'protocols/Steam/src/steam_utils.cpp') diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index 33ac3f8bde..c45440cb10 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -182,4 +182,21 @@ void CSteamProto::ShowNotification(const TCHAR *caption, const wchar_t *message, void CSteamProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact) { ShowNotification(TranslateT(MODULE), message, flags, hContact); -} \ No newline at end of file +} + +INT_PTR __cdecl CSteamProto::OnGetEventTextChatStates(WPARAM, LPARAM lParam) +{ + // Retrieves a chat state description from an event + + DBEVENTGETTEXT *pdbEvent = (DBEVENTGETTEXT *)lParam; + if (pdbEvent->dbei->cbBlob > 0) { + if (pdbEvent->dbei->pBlob[0] == STEAM_DB_EVENT_CHATSTATES_GONE) { + if (pdbEvent->datatype == DBVT_WCHAR) + return (INT_PTR)mir_tstrdup(TranslateT("closed chat session")); + else if (pdbEvent->datatype == DBVT_ASCIIZ) + return (INT_PTR)mir_strdup(Translate("closed chat session")); + } + } + + return NULL; +} -- cgit v1.2.3