void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            // before being able to interact with friends, you must wait for the account info callback
            // this callback is posted shortly after a successful logon

            // at this point, we can go online on friends, so lets do that
            _steamFriends.SetPersonaState(EPersonaState.Online);
            if (_cmd == Command.GetInfo)
            {
                _userInfoVm.botName            = _steamFriends.GetPersonaName();
                _userInfoVm.botStatus          = _steamFriends.GetPersonaState().ToString();
                _userInfoVm.friendsCount       = _steamFriends.GetFriendCount();
                _userInfoVm.country            = callback.Country;
                _userInfoVm.facebookName       = callback.FacebookName;
                _userInfoVm.flags              = callback.AccountFlags.ToString();
                _userInfoVm.countAuthComputers = callback.CountAuthedComputers.ToString();
                _userInfoVm.state              = _steamFriends.GetPersonaState().ToString();
                _userInfoVm.steamId            = _steamUser.SteamID.ToString();
                _userInfoVm.profileUrl         = "https://steamcommunity.com/profiles/" + _steamUser.SteamID.ConvertToUInt64().ToString();
                string html;
                using (WebClient client = new WebClient())
                {
                    client.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2";
                    html = client.DownloadString("https://steamid.xyz/" + _steamUser.SteamID.ConvertToUInt64().ToString());
                }
                _userInfoVm.image_url = GetImagesInHTMLString(html);
                _isMessageSent        = true;
            }
        }
示例#2
0
        private void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            // before being able to interact with friends, you must wait for the account info callback
            // this callback is posted shortly after a successful logon

            _steamFriends.SetPersonaState(EPersonaState.Busy);
        }
示例#3
0
        void OnAccountInfo(SteamUser.AccountInfoCallback callback)         // Получаем аккаунт инфо
        {
            Console.WriteLine($"AccountInfo получен. {callback.PersonaName} теперь активный.");

            steamFriends.SetPersonaState(EPersonaState.Online);             // ** offline mode works as well !
            steamFriends.SetPersonaName("[unknown]");
        }
示例#4
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     // before being able to interact with friends, you must wait for the account info callback
     // this callback is posted shortly after a successful logon
     // at this point, we can go online on friends, so lets do that
     steamFriends.SetPersonaState(EPersonaState.Online);
 }
示例#5
0
 static public void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     if (callback == null)
     {
         return;
     }
 }
示例#6
0
 internal async void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     if (!BotConfig.FarmOffline)
     {
         steamFriends.SetPersonaState(EPersonaState.Online);
     }
 }
示例#7
0
        /// <summary>
        /// Sets the persona state to online and, since logging in changes the
        /// bot's name to [unknown] sometimes, sets the persona name.
        /// </summary>
        /// <param name="callback"></param>
        private void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            Console.WriteLine("Setting account info.");

            // TODO: put this stuff in an .ini file
            SteamFriends.SetPersonaState(EPersonaState.Online);
            SteamFriends.SetPersonaName("xXxTrollSlayerxXx");
        }
示例#8
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     if (friends.GetPersonaName() != "VietNam Cards Trading Bot")
     {
         friends.SetPersonaName("VietNam Cards Trading Bot");
     }
     friends.SetPersonaState(EPersonaState.Online);
 }
示例#9
0
文件: Program.cs 项目: shounen/iRon
 //Now we create our OnAccountInfo function to have the bot perform a specific
 //Action when steam sends it the info of the account it is logged in as
 //What we're going to do is set our "Persona State" to online, this makes the bot
 //Show up as online in people's friends lists
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     //Set our persona state to online
     steamFriends.SetPersonaState(EPersonaState.Online);
     //Now our bot will show up in our friends list
     //Now, let's create a callback for steam messages so that
     //we can respond to them!
 }
示例#10
0
        private void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            Friends.SetPersonaState(EPersonaState.Busy);

            foreach (var chatRoom in Settings.Current.ChatRooms)
            {
                Friends.JoinChat(chatRoom);
            }
        }
示例#11
0
        private void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            if (callback == null)
            {
                return;
            }

            SteamFriends.SetPersonaState(EPersonaState.Online);
        }
示例#12
0
        private static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            Country = callback.Country;

            if (!Settings.IsFullRun)
            {
                Sync();
            }
        }
示例#13
0
        //
        // Local Persona
        //

        public void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            EPersonaState PersonaState = setup.steamFriends.GetPersonaState();

            if (PersonaState == EPersonaState.Offline)
            {
                Console.WriteLine("Setting personastate to Online");
                setup.steamFriends.SetPersonaState(EPersonaState.Online);
            }
        }
示例#14
0
        private static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            Country = callback.Country;

            var stateMsg = new ClientMsgProtobuf <CMsgClientChangeStatus>(EMsg.ClientChangeStatus)
            {
                Body =
                {
                    persona_state       = (uint)EPersonaState.Online,
                    persona_state_flags = uint.MaxValue,
                    player_name         = Steam.Instance.Friends.GetPersonaName()
                }
            };

            Steam.Instance.Client.Send(stateMsg);

            Sync();
        }
示例#15
0
        private static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            Country = callback.Country;

            var stateMsg = new ClientMsgProtobuf <CMsgClientChangeStatus>(EMsg.ClientChangeStatus)
            {
                Body =
                {
                    persona_state       = (uint)EPersonaState.Online,
                    persona_state_flags = uint.MaxValue,
                    player_name         = Steam.Instance.Friends.GetPersonaName()
                }
            };

            Steam.Instance.Client.Send(stateMsg);

            if (Settings.IsFullRun)
            {
                InGameShorcut.game_extra_info = $"\u23E9 Full run: {Settings.Current.FullRun.ToString()}";
            }

            Sync();
        }
示例#16
0
        //Events :
        #region Events callback


        private void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            SteamFriends.SetPersonaState(EPersonaState.Online);

            Name = SteamFriends.GetPersonaName();
        }
 void OnAccountInfo(SteamUser.AccountInfoCallback pData)
 {
     //Announce to all friends that we are online
     m_SteamFriends.SetPersonaState(EPersonaState.Online);
 }
示例#18
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     steamFriends.SetPersonaState(EPersonaState.Online);
     Console.WriteLine("Set PersonaState to Online");
     //.SetPersonaName("⚡ Thunderbolt");
 }
示例#19
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     UserPersonaName = callback.PersonaName;
     UserCountry     = callback.Country;
 }
示例#20
0
 static void onAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     steamFriends.SetPersonaState(EPersonaState.Online);
     Console.WriteLine("State: {0}", steamFriends.GetPersonaState());
 }
示例#21
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     Log.Instance.Debug("Got user info");
     steamFriends.SetPersonaState(EPersonaState.Online);
     steamFriends.SetPersonaName(displayName);
 }
示例#22
0
 void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     // go online on friends in order to receive clan state callbacks
     Friends.SetPersonaState(EPersonaState.Online);
 }
示例#23
0
        static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
        {
            // Set the Steam bots status to Online

            steamFriends.SetPersonaState(EPersonaState.Online);
        }
示例#24
0
        } // Wird gecalled wenn wir das erste mal Steam Guard authentifizieren

        static void OnAccountInfo(SteamUser.AccountInfoCallback callback) // Wird abgerufen wenn Steam die Account Information grabbed
        {
            steamFriends.SetPersonaState(EPersonaState.Online);
        }
示例#25
0
 private static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     Friends.SetPersonaState(EPersonaState.Busy);
 }
示例#26
0
 private static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     Sync();
 }
示例#27
0
 private void OnSteamUserAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     ChangePersonaState(EPersonaState.Online);
 }
示例#28
0
 static void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     // Log in to Steam friends..
     steamFriends.SetPersonaState(EPersonaState.Online);
 }
示例#29
0
 void OnAccountInfo(SteamUser.AccountInfoCallback callback)
 {
     steamFriends.SetPersonaState(EPersonaState.Online);
 }
示例#30
0
 private static void OnAccountInfo(SteamUser.AccountInfoCallback obj)
 {
     _steamFriends.SetPersonaState(EPersonaState.Online);
 }