summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/steam_utils.cpp')
-rw-r--r--protocols/Steam/src/steam_utils.cpp19
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;
+}