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."); }
private void DJCommand(RegisteredCommandArgs argument) { if (this.con == null) { this.con = new DJCon(this); con.Show(); } }
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]}"); }
private void CommandHandler(RegisteredCommandArgs argument) { if (argument.Command.Contains("shout")) { argument.Window.OutputText("POLO"); } else { argument.Window.OutputText("polo"); } }
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(); } }
private void OnCommand(RegisteredCommandArgs argument) { _settingsForm.Show(); }
private void CommandHandler(RegisteredCommandArgs argument) { _host.ActiveIWindow.ExecuteCommand(".echo ExamplePlugin Polo"); }