async def _process_client_log_on_response(self, body): logger.debug("Processing message ClientLogOnResponse") message = steammessages_clientserver_login_pb2.CMsgClientLogonResponse( ) message.ParseFromString(body) result = message.eresult if result == EResult.AccountLogonDenied: if message.email_domain: await self.user_authentication_handler('two_step', 'email') if result == EResult.AccountLoginDeniedNeedTwoFactor: await self.user_authentication_handler('two_step', 'mobile') if result == EResult.OK: interval = message.out_of_game_heartbeat_seconds self.steam_id = message.client_supplied_steamid await self.user_authentication_handler('steam_id', self.steam_id) await self.user_authentication_handler( 'account_id', message.client_supplied_steamid - self._ACCOUNT_ID_MASK) self._heartbeat_task = asyncio.create_task( self._heartbeat(interval)) else: logger.info(f"Failed to log on, reason : {message}") if self.log_on_handler is not None: await self.log_on_handler(result)
async def _process_client_log_on_response(self, body): logger.debug("Processing message ClientLogOnResponse") message = steammessages_clientserver_login_pb2.CMsgClientLogonResponse( ) message.ParseFromString(body) result = message.eresult if result == EResult.OK: interval = message.out_of_game_heartbeat_seconds self._heartbeat_task = asyncio.create_task( self._heartbeat(interval)) if self.log_on_handler is not None: await self.log_on_handler(result)