internal PluginLoadInfo(string filePath, PluginLoadResult result, string message) { _filePath = filePath; _result = result; _message = message; }
internal PluginLoadInfo(string filePath, PluginLoadResult result, Exception ex) { _filePath = filePath; _result = result; _exception = ex; }
internal PluginLoadInfo(string filePath, PluginLoadResult result) { _filePath = filePath; _result = result; }
public override void OnCommand(BotShell bot, CommandArgs e) { if (e.Command == "plugins overview") { this.OnPluginsOverviewCommand(bot, e); return; } if (e.Args.Length > 1) { if (!bot.Plugins.Exists(e.Args[1])) { bot.SendReply(e, "No such plugin: " + e.Args[1]); return; } switch (e.Args[0]) { case "install": if (bot.Plugins.Install(e.Args[1])) { bot.SendReply(e, "Installed: " + e.Args[1]); break; } else { bot.SendReply(e, "Unable to install plugin"); return; } case "load": PluginLoadResult result = bot.Plugins.Load(e.Args[1]); if (result == PluginLoadResult.Ok) { bot.SendReply(e, "Loaded: " + e.Args[1]); break; } else { bot.SendReply(e, "Unable to load plugin. Returned Code: " + result.ToString()); return; } case "uninstall": if (bot.Plugins.Uninstall(e.Args[1])) { bot.SendReply(e, "Uninstalled: " + e.Args[1]); break; } else { bot.SendReply(e, "Unable to uninstall plugin"); return; } case "unload": if (bot.Plugins.Unload(e.Args[1])) { bot.SendReply(e, "Unloaded: " + e.Args[1]); break; } else { bot.SendReply(e, "Unable to unload plugin"); return; } case "info": this.OnPluginsInfoCommand(bot, e); return; default: bot.SendReply(e, "Unknown Parameter: " + e.Args[0]); return; } } this.OnPluginsCommand(bot, e); }