Ejemplo n.º 1
0
 // Initialize
 private void Awake()
 {
     ConsoleCommands.AddCommand("Timer.Start", timerStart, "Starts the timer");
     ConsoleCommands.AddCommand("Timer.Pause", timerPause, "Pauses the timer");
     ConsoleCommands.AddCommand("Timer.Stop", timerStop, "Stops the timer");
     ConsoleCommands.AddCommand("Timer.TickBy", tickBy, "Changes how much the timer ticks by");
     ConsoleCommands.AddCommand("Disco", disco, "Disco Mode!");
     ConsoleCommands.AddCommand("Disco.Stop", discoStop, "Stops discomode");
 }
Ejemplo n.º 2
0
        //protected ConsoleCommands RegisterConsoleCommands()
        protected void RegisterConsoleCommands(ref ConsoleCommands Commands)
        {
            //ConsoleCommands Commands = new ConsoleCommands();

            Commands.AddCommand("version", this.VersionPrint, "", LogStrings.Help.Version, false);

            Commands.AddCommand("?", this.HelpPrint, "<COMMAND?>", LogStrings.Help.OfHelp, false);
            Commands.AddCommand("help", this.HelpPrint, "<COMMAND?>", LogStrings.Help.OfHelp, false);

            Commands.AddCommand("list", this.ListPrint, "<CATEGORY?>", LogStrings.Help.List, false);
            Commands.AddCommand("ls", this.ListPrint, "<CATEGORY?>", LogStrings.Help.List, false);

            Commands.AddCommand("config", this.SetGetConfig, "[set <CATEGORY> <CONFIG_KEY> <CONFIG_VALUE>]/[get <CATEGORY> <CONFIG_NAME>", LogStrings.Help.Config, false);
            Commands.AddCommand("cfg", this.SetGetConfig, "[set <CATEGORY> <CONFIG_KEY> <CONFIG_VALUE>]/[get <CATEGORY> <CONFIG_NAME>]/[-list]", LogStrings.Help.Config, false);

            Commands.AddCommand("login", this.LogIn, "<LOGIN> <PASSWORD>", LogStrings.Help.Login, false);

            Commands.AddCommand("loginalt", this.LogInAlt, "<ACCESS_KEY> <USER_ID>", LogStrings.Help.Login, false);

            Commands.AddCommand("logout", this.LogOutCon, "", LogStrings.Help.Logout, true);
            #region Audio commands
            var AudioCommands = Commands.AddCategory("audio");

            AudioCommands.AddCommand("?", Audio.Help, "<COMMAND?>", LogStrings.Help.Audio.General, false);
            AudioCommands.AddCommand("help", Audio.Help, "<COMMAND?>", LogStrings.Help.Audio.General, false);

            AudioCommands.AddCommand("count", Audio.ConCount, "<USER_ID?>", LogStrings.Help.Audio.Count, true);

            AudioCommands.AddCommand("get", Audio.ConGet, "<USER_ID?> <COUNT> <OFFSET?>", LogStrings.Help.Audio.Get, true);

            AudioCommands.AddCommand("search", Audio.ConSearch, "<QUERRY>", LogStrings.Help.Audio.Search, true);

            AudioCommands.AddCommand("info", Audio.ConFullInfo, "<AUDIO_ITEM>/<LIST_INDEX>", LogStrings.Help.Audio.Info, true);

            AudioCommands.AddCommand("albums", Audio.ConGetAlbums, "<USER_ID?>", LogStrings.Help.Audio.Albums, true);

            AudioCommands.AddCommand("add", Audio.ConAdd, "<AUDIO_ITEM>/<LIST_INDEX>", LogStrings.Help.Audio.Add, true);

            AudioCommands.AddCommand("delete", Audio.ConDelete, "<AUDIO_ITEM>/<LIST_INDEX>", LogStrings.Help.Audio.Delete, true);

            AudioCommands.AddCommand("download", Audio.ConDownload, "<AUDIO_ITEM>/<LIST_INDEX>", LogStrings.Help.Audio.Download, true);
            #region Audio player commands
            var AudioPlayerCommands = AudioCommands.AddCategory("player");

            AudioPlayerCommands.AddCommand("help", Audio.Player.Help, "<COMMAND?>", LogStrings.Help.Audio.Player.General, false);
            AudioPlayerCommands.AddCommand("?", Audio.Player.Help, "<COMMAND?>", LogStrings.Help.Audio.Player.General, false);

            AudioPlayerCommands.AddCommand("play", Audio.Player.ConPlay, "<START_INDEX?>", LogStrings.Help.Audio.Player.Play, false);

            AudioPlayerCommands.AddCommand("next", Audio.Player.ConNext, "", LogStrings.Help.Audio.Player.Next, false);

            AudioPlayerCommands.AddCommand("prev", Audio.Player.ConPrev, "", LogStrings.Help.Audio.Player.Prev, false);

            AudioPlayerCommands.AddCommand("pause", Audio.Player.ConPause, "", LogStrings.Help.Audio.Player.Pause, false);

            AudioPlayerCommands.AddCommand("resume", Audio.Player.ConPause, "", LogStrings.Help.Audio.Player.Resume, false);

            AudioPlayerCommands.AddCommand("stop", Audio.Player.ConStop, "", LogStrings.Help.Audio.Player.Stop, false);

            AudioPlayerCommands.AddCommand("listadd", Audio.Player.ConAddToPlaylist, "<AUDIO_ITEM>/<LIST_INDEX>, ...", LogStrings.Help.Audio.Player.ListAdd, false);

            AudioPlayerCommands.AddCommand("listdel", Audio.Player.ConDelFromPlaylist, "<AUDIO_ITEM>/<LIST_INDEX>, ...", LogStrings.Help.Audio.Player.ListDel, false);

            AudioPlayerCommands.AddCommand("volume", Audio.Player.ConVolume, "<VOLUME>", LogStrings.Help.Audio.Player.Volume, false);

            AudioPlayerCommands.AddCommand("listshow", Audio.Player.ConShowPL, "", LogStrings.Help.Audio.Player.ShowPl, false);

            AudioPlayerCommands.AddCommand("listshuffle", Audio.Player.ConShufflePL, "", LogStrings.Help.Audio.Player.ShufflePl, false);
            #endregion
            #endregion
            //return Commands;
        }