Esempio n. 1
0
        public bool OnEnable(IRecognitionServer server)
        {
            this.server = server;
            steamClient = new SteamWebClient("Voice Recognition System", "irjgEfRGKftgj"); // Will setup a configuration system at some point.
            server.GetLogger().Info("Enabling Steam.dll Plugin");

            server.GetLogger().Info("Pinging for Authorisation with Steam Client");

            if (!steamClient.AuthoriseClient())
            {
                server.GetLogger().Warn("Please authorise this system to control your Steam Client.");
                server.GetLogger().Info("Another attempt will be made in 10 seconds. If this fails, Steam.dll will not be loaded.");

                Thread.Sleep(10000);

                if (!steamClient.AuthoriseClient())
                {
                    server.GetLogger().Severe("Failed to authorise with Steam Client. Reload plugin to re-attempt.");
                    return(false);
                }
            }

            commands.Add(new Commands.Game(this));
            commands.Add(new Commands.Space(this));

            return(true);
        }
Esempio n. 2
0
        public bool OnEnable(IRecognitionServer server)
        {
            this.server = server;
            steamClient = new SteamWebClient("Voice Recognition System", "irjgEfRGKftgj"); // Will setup a configuration system at some point.
            server.GetLogger().Info("Enabling Steam.dll Plugin");

            server.GetLogger().Info("Pinging for Authorisation with Steam Client");

            if (!steamClient.AuthoriseClient())
            {
                server.GetLogger().Warn("Please authorise this system to control your Steam Client.");
                server.GetLogger().Info("Another attempt will be made in 10 seconds. If this fails, Steam.dll will not be loaded.");

                Thread.Sleep(10000);

                if (!steamClient.AuthoriseClient())
                {
                    server.GetLogger().Severe("Failed to authorise with Steam Client. Reload plugin to re-attempt.");
                    return false;
                }
            }

            commands.Add(new Commands.Game(this));
            commands.Add(new Commands.Space(this));

            return true;
        }
Esempio n. 3
0
        public bool OnEnable(IRecognitionServer server)
        {
            this.server = server;
            server.GetLogger().Info("Enabling Media.dll Plugin");
            server.GetLogger().Info("Updating Song Library");
            SongHelper.GetSongs();

            commands.Add(new Commands.Play(this));
            commands.Add(new Commands.Controls(this));

            return(true);
        }
Esempio n. 4
0
        public bool OnEnable(IRecognitionServer server)
        {
            this.server = server;
            server.GetLogger().Info("Enabling Media.dll Plugin");
            server.GetLogger().Info("Updating Song Library");
            SongHelper.GetSongs();

            commands.Add(new Commands.Play(this));
            commands.Add(new Commands.Controls(this));

            return true;
        }