From 315a739e60883dd24c50c2bde48c211b6dab642e Mon Sep 17 00:00:00 2001 From: seishun Date: Sat, 24 Aug 2013 23:07:44 +0300 Subject: [PATCH] Handle ClientLoggedOff --- handlers.cpp | 13 +++++++++++++ steam++.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/handlers.cpp b/handlers.cpp index d87c401..72a63d4 100644 --- a/handlers.cpp +++ b/handlers.cpp @@ -137,6 +137,19 @@ void SteamClient::HandleMessage(EMsg emsg, const unsigned char* data, std::size_ break; + case EMsg::ClientLoggedOff: + { + if (!onLogOff) { + return; + } + + CMsgClientLoggedOff logged_off; + logged_off.ParseFromArray(data, length); + onLogOff(static_cast(logged_off.eresult())); + } + + break; + case EMsg::ClientUpdateMachineAuth: { if (!onSentry) { diff --git a/steam++.h b/steam++.h index 25d387a..c410bef 100644 --- a/steam++.h +++ b/steam++.h @@ -152,6 +152,8 @@ namespace Steam { */ std::function onLogOn; + std::function onLogOff; + std::function onSentry; /**