diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-12-19 21:24:11 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-12-19 21:24:11 +0000 |
commit | 925c04de5ee370511fe1c09d42ba8c4589c7d2ee (patch) | |
tree | b48de2c2498b01f5195d5016f6e47f91141d71ab /protocols/Steam/src/steam_utils.cpp | |
parent | a313a57561b0a4ab336f031f4ccd433d659bb7fb (diff) |
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
Diffstat (limited to 'protocols/Steam/src/steam_utils.cpp')
-rw-r--r-- | protocols/Steam/src/steam_utils.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
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;
+}
|