summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/steam_events.cpp3
-rw-r--r--protocols/Steam/src/steam_utils.cpp13
2 files changed, 7 insertions, 9 deletions
diff --git a/protocols/Steam/src/steam_events.cpp b/protocols/Steam/src/steam_events.cpp
index 0303a9a08a..b545ec2808 100644
--- a/protocols/Steam/src/steam_events.cpp
+++ b/protocols/Steam/src/steam_events.cpp
@@ -13,8 +13,7 @@ int CSteamProto::OnModulesLoaded(WPARAM, LPARAM)
dbEventType.module = m_szModuleName;
dbEventType.eventType = EVENTTYPE_STEAM_CHATSTATES;
dbEventType.descr = "Chat state notifications";
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
+ DbEvent_RegisterType(&dbEventType);
return 0;
}
diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp
index 0fb7f4474d..9a3633953f 100644
--- a/protocols/Steam/src/steam_utils.cpp
+++ b/protocols/Steam/src/steam_utils.cpp
@@ -184,17 +184,16 @@ void CSteamProto::ShowNotification(const wchar_t *message, int flags, MCONTACT h
ShowNotification(MODULEW, message, flags, hContact);
}
-INT_PTR __cdecl CSteamProto::OnGetEventTextChatStates(WPARAM, LPARAM lParam)
+INT_PTR __cdecl CSteamProto::OnGetEventTextChatStates(WPARAM pEvent, LPARAM datatype)
{
// 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)
+ DBEVENTINFO *dbei = (DBEVENTINFO *)pEvent;
+ if (dbei->cbBlob > 0) {
+ if (dbei->pBlob[0] == STEAM_DB_EVENT_CHATSTATES_GONE) {
+ if (datatype == DBVT_WCHAR)
return (INT_PTR)mir_wstrdup(TranslateT("closed chat session"));
- else if (pdbEvent->datatype == DBVT_ASCIIZ)
- return (INT_PTR)mir_strdup(Translate("closed chat session"));
+ return (INT_PTR)mir_strdup(Translate("closed chat session"));
}
}