Beispiel #1
0
 public void Logout()
 {
     steamClient.Disconnect();
     isConnected = false;
     isLoggedIn  = false;
     isRunning   = false;
 }
Beispiel #2
0
        private void OnLoggedOn(SteamUser.LoggedOnCallback obj)
        {
            if (obj.Result != EResult.OK)
            {
                Console.WriteLine("[Steam] Login denied, reason: {0}", obj.Result);
                Client.Disconnect();
                return;
            }

            Connected = true;
            Console.WriteLine("[Steam] We are connected! (user={0})", _config["steam_user"]);
        }
Beispiel #3
0
        private void OnLoggedOn(SteamUser.LoggedOnCallback obj)
        {
            if (obj.Result != EResult.OK)
            {
                _logger.LogError("Login denied, reason: {0}", obj.Result);
                Client.Disconnect();
                return;
            }

            Connected = true;
            _logger.LogInformation("We are connected! (user={0})", _config["steam_user"]);
        }
Beispiel #4
0
        private void OnLoggedOff(SteamUser.LoggedOffCallback obj)
        {
            logger.Info($"Log off from Steam with bot {BotName} by reason: {obj.Result.ToString()}");
            if (obj.Result == EResult.LoggedInElsewhere)
            {
                logger.Error($"Error occuried with bot {BotName}. Maybe there are some problems with bot... Change bot state to 'Crashed'", new Exception());

                botManager.UpdateBotState(EBotState.Crashed);

                return;
            }

            if (obj.Result == EResult.LogonSessionReplaced)
            {
                return;
            }

            logger.Info("Disconnecting from SteamClient...");
            steamClient.Disconnect();
        }