예제 #1
0
 private void NIBLHelpCommand(RegisteredCommandArgs argument)
 {
     _host.ActiveIWindow.ExecuteCommand($"echo -st  52[NIBL Search]:  Version: {Version}");
     _host.ActiveIWindow.ExecuteCommand($"echo -st  52[NIBL Search]:  Commands:");
     _host.ActiveIWindow.ExecuteCommand($"echo -st  52[NIBL Search]:  /nibl [search terms]      - Opens the NIBL Search window.");
     _host.ActiveIWindow.ExecuteCommand($"echo -st  52[NIBL Search]:  /cancelget <botname> <pack>       - Will remove the file from the auto-retry list.");
 }
예제 #2
0
 private void DJCommand(RegisteredCommandArgs argument)
 {
     if (this.con == null)
     {
         this.con = new DJCon(this); con.Show();
     }
 }
예제 #3
0
        private async void NIBLCancelGet(RegisteredCommandArgs argument)
        {
            var arguments = argument.Command.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
            await _packQueueClient.RemoveFromQueueByPack(arguments[1], arguments[2]);

            await _packQueueClient.ExecuteCommandOnNiblChannel($"/timer.{arguments[1]}.{arguments[2]} off");

            await _packQueueClient.ExecuteCommandOnNiblChannel($"echo -st  52[NIBL DLQ]: Cancelled pack {arguments[2]} from bot {arguments[1]}");
        }
예제 #4
0
 private void CommandHandler(RegisteredCommandArgs argument)
 {
     if (argument.Command.Contains("shout"))
     {
         argument.Window.OutputText("POLO");
     }
     else
     {
         argument.Window.OutputText("polo");
     }
 }
예제 #5
0
        private void NIBLOpenSearch(RegisteredCommandArgs argument)
        {
            string comm = "";

            if (argument.Command.Length > 6)
            {
                comm = argument.Command.Remove(0, 6);
            }
            bool trustbots = false;
            bool retryDL   = false;

            try
            {
                var keys = _host.GetVariables.Keys.Cast <string>();
                if (keys.Contains("%nibl.trustbots"))
                {
                    string value = _host.GetVariables["%nibl.trustbots"].ToString();
                    if (value == "true")
                    {
                        trustbots = true;
                    }
                }
                if (keys.Contains("%nibl.retryDL"))
                {
                    string value = _host.GetVariables["%nibl.retryDL"].ToString();
                    if (value == "true")
                    {
                        retryDL = true;
                    }
                }
            }
            catch (Exception ex)
            {
                GetFirstServer().ExecuteCommand($"echo -at Error: {ex.Message}");
            }
            if (IsNIBLWindowOpen)
            {
                _testWindow.Activate();
            }
            else
            {
                Model.SimpleCollection = null;
                _testWindow            = new NiblSearchWindow(_host, _searchService, Model, _packQueueClient, trustbots, retryDL, comm);
                System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(_testWindow);
                _testWindow.Closed += _testWindow_Closed;
                IsNIBLWindowOpen    = true;
                _testWindow.Show();
            }
        }
예제 #6
0
 private void OnCommand(RegisteredCommandArgs argument)
 {
     _settingsForm.Show();
 }
예제 #7
0
 private void CommandHandler(RegisteredCommandArgs argument)
 {
     _host.ActiveIWindow.ExecuteCommand(".echo ExamplePlugin Polo");
 }