Exemplo n.º 1
0
        private void OnConnected(SteamClient.ConnectedCallback callback)
        {
            _logger.LogInformation("Connected to Steam! Logging in...");

            steamUser.LogOnAnonymous();
        }
Exemplo n.º 2
0
        static void OnConnected(SteamClient.ConnectedCallback callback)
        {
            if (callback.ToString() != "SteamKit2.SteamClient+ConnectedCallback")
            {
                Console.WriteLine("[" + Program.BOTNAME + "] - Unable to connect to Steam: {0}", callback);

                isRunning = false;
                return;
            }

            //Sucess
            Console.WriteLine("[" + Program.BOTNAME + "] - Connected to Steam! Logging in '{0}'...", user);
            Notification.NotifHelper.MessageBox.Show("Info", "Connected to Steam!\nLogging in " + user + "...");


            byte[] sentryHash = null;
            if (File.Exists(Program.SentryFolder + user + ".bin"))
            {
                byte[] sentryFile = File.ReadAllBytes(Program.SentryFolder + user + ".bin");
                sentryHash = CryptoHelper.SHAHash(sentryFile);
            }

            //Set LoginKey for user
            var list = JsonConvert.DeserializeObject <RootObject>(File.ReadAllText(Program.AccountsJsonFile));

            foreach (var a in list.Accounts)
            {
                if (a.username == user)
                {
                    // if (a.LoginKey.ToString() == "undefined") // deu?
                    if (string.IsNullOrEmpty(a.LoginKey) || a.LoginKey.ToString() == "undefined")
                    {
                        // NewloginKey = null;
                        //a.LoginKey = "";
                    }
                    else
                    {
                        NewloginKey = a.LoginKey;
                        myUniqueId  = a.LoginKey;
                        File.WriteAllText(Program.AccountsJsonFile, JsonConvert.SerializeObject(list, Formatting.Indented)); // update login key
                    }
                }
            }

            var  random = new Random();
            int  number = random.Next(1337, Int32.MaxValue);
            uint lid    = (uint)(number + (uint)Int32.MaxValue);

            steamUser.LogOn(new SteamUser.LogOnDetails
            {
                Username = user,
                Password = pass,
                //
                AuthCode       = authCode,
                TwoFactorCode  = twoFactorAuth,
                SentryFileHash = sentryHash,
                //
                LoginID = lid,
                ShouldRememberPassword = true,
                LoginKey = NewloginKey
            });
        }
Exemplo n.º 3
0
        protected override void OnConnected(SteamClient.ConnectedCallback callback)
        {
            Log.WriteInfo("MasterMonitor", "Connected to Steam!");

            base.OnConnected(callback);
        }
Exemplo n.º 4
0
 private void ConnectedCallback(SteamClient.ConnectedCallback connected)
 {
     //_Parent.Log.ConsolePrint(LogLevel.Debug, "Connected to Steam3, Authenticating as anonymous user");
     _User.LogOnAnonymous();
 }
Exemplo n.º 5
0
        private void OnConnected(SteamClient.ConnectedCallback callback)
        {
            Reconnecting = 0;

            steamUser.LogOn();
        }
Exemplo n.º 6
0
 private void OnConnected(SteamClient.ConnectedCallback obj)
 {
     Logger.Log24Bit(ConsoleSwatch.XTermColor.Aquamarine, true, Console.Out, string.Empty,
                     $"Connected to Steam! Logging in with {(string.IsNullOrWhiteSpace(SteamUsername) ? "anonymous dedicated server user" : $"user {SteamUsername}")}");
Exemplo n.º 7
0
        private void OnConnected(SteamClient.ConnectedCallback callback)
        {
            Bootstrap.Log("Connected to Steam, logging in...");

            User.LogOnAnonymous();
        }
Exemplo n.º 8
0
 private void onConnected(SteamClient.ConnectedCallback callback)
 {
     onConnectedResult = callback.Result;
     onConnectedEvent.Set();
 }
 private void OnConnected(SteamClient.ConnectedCallback obj)
 {
     logger.Info("Client is connected, logging on as anonymous user");
     user.LogOnAnonymous();
 }
Exemplo n.º 10
0
 protected virtual void OnConnected(SteamClient.ConnectedCallback callback)
 {
     steamUser.LogOn();
 }
Exemplo n.º 11
0
        // Static event handlers
        public void OnConnect(SteamClient.ConnectedCallback cb)
        {
            Log.WriteLine("Connected [token: {0}]", SteamClient.SessionToken);

            Connected = true;
        }
Exemplo n.º 12
0
        /// <summary>
        /// Perform action on successful connection
        /// Login to the Useraccount
        /// </summary>
        /// <param name="_callback"></param>
        private void OnConnected(SteamClient.ConnectedCallback _callback)
        {
            m_logger.Info("Connected to Steam!");

            m_steamUser.LogOn(m_steamUserLogonDetails);
        }
Exemplo n.º 13
0
 static void OnConnected( SteamClient.ConnectedCallback callback )
 {
     m_steamUser.LogOnAnonymous();
 }
Exemplo n.º 14
0
 private void OnConnected(SteamClient.ConnectedCallback obj) => _credentials.HandleConnectedCallback(_user);
Exemplo n.º 15
0
 public abstract void OnConnected(SteamClient.ConnectedCallback callback);
Exemplo n.º 16
0
 private void OnConnected(SteamClient.ConnectedCallback callback)
 {
 }
Exemplo n.º 17
0
 private void OnConnected(SteamClient.ConnectedCallback obj)
 {
     UpdateStatus(DotaClientStatus.Normal, "Steam: Connected.");
     Connected = true;
 }
Exemplo n.º 18
0
 // When connected, login
 private void OnConnected(SteamClient.ConnectedCallback callback)
 {
     Kraxbot.Log("Connected");
     kraxbot.Login();
 }