示例#1
0
        static void UserWebLogOn()
        {
            do
            {
                IsWebLoggedIn = steamWeb.Authenticate(myUniqueId, steamClient, myUserNonce);

                if (!IsWebLoggedIn)
                {
                    Console.WriteLine("[" + Program.BOTNAME + "] - Authentication failed, retrying in 5s...");
                    Thread.Sleep(5000);
                }
            } while (!IsWebLoggedIn); //test

            Console.WriteLine("[" + Program.BOTNAME + "] - User Authenticated to Web!");

            cookiesAreInvalid = false;
            //    try
            //    {
            //        if (steamWeb.Authenticate(myUniqueId, steamClient, myUserNonce))
            //        {
            //            IsWebLoggedIn = true;
            //            Console.WriteLine("[" + Program.BOTNAME + "] - User Authenticated! ");
            //            cookiesAreInvalid = false;
            //        }
            //    }
            //    catch (Exception ex)
            //    {
            //        Console.WriteLine("[" + Program.BOTNAME + "] - Error on UserWebLogon: " + ex.Message);
            //    }
            //}
        }
示例#2
0
        void UserWebLogOn()
        {
            do
            {
                IsLoggedIn = SteamWeb.Authenticate(myUniqueId, SteamClient, myUserNonce);

                if (!IsLoggedIn)
                {
                    Log.Warn("Authentication failed, retrying in 2s...");
                    Thread.Sleep(2000);
                }
            } while (!IsLoggedIn);

            Log.Success("User Authenticated!");

            cookiesAreInvalid = false;
        }
示例#3
0
        public bool Autenticate()
        {
            web = new SteamWeb();
            web.Authenticate(cookies);

            if (!web.VerifyCookies())
            {
                return(false);
            }

            api     = new TradeOfferWebAPI(apiKey, web);
            manager = new TradeOfferManager(apiKey, web);
            session = new OfferSession(api, web);

            SteamID = new SteamID(76561198043356049);
            TradeOfferCheckingLoop();

            return(true);
        }