Exemplo n.º 1
0
        public Client(SteamBot bot)
        {
            this.Bot = bot;

            this.Active   = new Dictionary <int, ulong>();
            this.Channels = new Dictionary <string, ulong>();
            this.Objects  = new Dictionary <ulong, Dictionary <int, object> >();

            this.AuthSequence = 1;
        }
Exemplo n.º 2
0
        public Coordinator(Machine <Event, S> machine, Client client, SteamBot bot)
        {
            this.Machine = machine;
            this.Client  = client;

            bot.Client.AddHandler(new Handler <Coordinator <S> >(OnMessage));
            new Callback <SteamClient.ConnectedCallback>(this.OnConnected, bot.CallbackManager);
            new Callback <SteamClient.DisconnectedCallback>(this.OnDisconnected, bot.CallbackManager);
            new Callback <SteamUser.LoggedOnCallback>(this.OnLoggedIn, bot.CallbackManager);
            new Callback <SteamGameCoordinator.MessageCallback>(this.OnMessage, bot.CallbackManager);
        }
Exemplo n.º 3
0
        public static SteamBot Create(string username, string password)
        {
            SteamBot clara = new SteamBot(username, password);

            clara.Client.AddHandler(new Handler <SteamBot>(clara.OnMessage));
            new Callback <SteamClient.ConnectedCallback>(clara.onConnected, clara.CallbackManager);
            new Callback <SteamClient.DisconnectedCallback>(clara.onDisconnected, clara.CallbackManager);
            new Callback <SteamUser.LoggedOnCallback>(clara.onLoggedIn, clara.CallbackManager);
            new Callback <SteamApps.AppOwnershipTicketCallback>(clara.onAppOwnership, clara.CallbackManager);
            new Callback <SteamApps.GameConnectTokensCallback>(clara.onTokensCallback, clara.CallbackManager);

            new Thread(clara.Run).Start();

            return(clara);
        }