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

            steamUser.LogOnAnonymous();
        }
示例#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
            });
        }
示例#3
0
        protected override void OnConnected(SteamClient.ConnectedCallback callback)
        {
            Log.WriteInfo("MasterMonitor", "Connected to Steam!");

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

            steamUser.LogOn();
        }
示例#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}")}");
示例#7
0
        private void OnConnected(SteamClient.ConnectedCallback callback)
        {
            Bootstrap.Log("Connected to Steam, logging in...");

            User.LogOnAnonymous();
        }
示例#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();
 }
示例#10
0
 protected virtual void OnConnected(SteamClient.ConnectedCallback callback)
 {
     steamUser.LogOn();
 }
示例#11
0
        // Static event handlers
        public void OnConnect(SteamClient.ConnectedCallback cb)
        {
            Log.WriteLine("Connected [token: {0}]", SteamClient.SessionToken);

            Connected = true;
        }
示例#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);
        }
示例#13
0
 static void OnConnected( SteamClient.ConnectedCallback callback )
 {
     m_steamUser.LogOnAnonymous();
 }
示例#14
0
 private void OnConnected(SteamClient.ConnectedCallback obj) => _credentials.HandleConnectedCallback(_user);
示例#15
0
 public abstract void OnConnected(SteamClient.ConnectedCallback callback);
示例#16
0
 private void OnConnected(SteamClient.ConnectedCallback callback)
 {
 }
示例#17
0
 private void OnConnected(SteamClient.ConnectedCallback obj)
 {
     UpdateStatus(DotaClientStatus.Normal, "Steam: Connected.");
     Connected = true;
 }
示例#18
0
 // When connected, login
 private void OnConnected(SteamClient.ConnectedCallback callback)
 {
     Kraxbot.Log("Connected");
     kraxbot.Login();
 }