public string Command(string cmd, string[] args)
        {
            try
            {
                if (replay.RecordRunning)
                {
                    if (args.Length > 0)
                    {
                        switch (args[0].ToLower())
                        {
                        case "save":
                        {
                            replay.CreateBackupReplay(@"replay_recordings\" + replay.GetReplayDefaultName());
                            return(Translations.Get("bot.replayCapture.created"));
                        }

                        case "stop":
                        {
                            replay.OnShutDown();
                            return(Translations.Get("bot.replayCapture.stopped"));
                        }
                        }
                    }
                    return(Translations.Get("general.available_cmd", "save, stop"));
                }
                else
                {
                    return(Translations.Get("bot.replayCapture.restart"));
                }
            }
            catch (Exception e)
            {
                return(e.Message);
            }
        }
Beispiel #2
0
        public string Command(string cmd, string[] args)
        {
            try
            {
                if (replay.RecordRunning)
                {
                    if (args.Length > 0)
                    {
                        switch (args[0].ToLower())
                        {
                        case "save":
                        {
                            replay.CreateBackupReplay(@"replay_recordings\" + replay.GetReplayDefaultName());
                            return("Replay file created.");
                        }

                        case "stop":
                        {
                            replay.OnShutDown();
                            return("Record stopped.");
                        }
                        }
                    }
                    return("Available commands: save, stop");
                }
                else
                {
                    return("Record was stopped. Restart the program to start another record.");
                }
            }
            catch (Exception e)
            {
                return(e.Message);
            }
        }
Beispiel #3
0
        public string Command(string cmd, string[] args)
        {
            try
            {
                if (replay.RecordRunning)
                {
                    if (args.Length > 0)
                    {
                        switch (args[0].ToLower())
                        {
                        case "save":
                        {
                            replay.CreateBackupReplay(@"replay_recordings\" + replay.GetReplayDefaultName());
                            return("重播文件已保存.");
                        }

                        case "stop":
                        {
                            replay.OnShutDown();
                            return("录像已停止.");
                        }
                        }
                    }
                    return("子命令: save, stop");
                }
                else
                {
                    return("录像已停止,重新启动MCC以重新录制.");
                }
            }
            catch (Exception e)
            {
                return(e.Message);
            }
        }