mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Massive tab and trailing space cleanup
This commit is contained in:
@@ -41,117 +41,117 @@ namespace OpenSim.Server.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Command manager -
|
||||
/// Wrapper for OpenSim.Framework.PluginManager to allow
|
||||
/// Wrapper for OpenSim.Framework.PluginManager to allow
|
||||
/// us to add commands to the console to perform operations
|
||||
/// on our repos and plugins
|
||||
/// </summary>
|
||||
public class CommandManager
|
||||
{
|
||||
public AddinRegistry PluginRegistry;
|
||||
protected PluginManager PluginManager;
|
||||
public class CommandManager
|
||||
{
|
||||
public AddinRegistry PluginRegistry;
|
||||
protected PluginManager PluginManager;
|
||||
|
||||
public CommandManager(AddinRegistry registry)
|
||||
public CommandManager(AddinRegistry registry)
|
||||
{
|
||||
PluginRegistry = registry;
|
||||
PluginManager = new PluginManager(PluginRegistry);
|
||||
AddManagementCommands();
|
||||
}
|
||||
PluginRegistry = registry;
|
||||
PluginManager = new PluginManager(PluginRegistry);
|
||||
AddManagementCommands();
|
||||
}
|
||||
|
||||
private void AddManagementCommands()
|
||||
{
|
||||
// add plugin
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
private void AddManagementCommands()
|
||||
{
|
||||
// add plugin
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin add", "plugin add \"plugin index\"",
|
||||
"Install plugin from repository.",
|
||||
"Install plugin from repository.",
|
||||
HandleConsoleInstallPlugin);
|
||||
|
||||
// remove plugin
|
||||
// remove plugin
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin remove", "plugin remove \"plugin index\"",
|
||||
"Remove plugin from repository",
|
||||
"Remove plugin from repository",
|
||||
HandleConsoleUnInstallPlugin);
|
||||
|
||||
// list installed plugins
|
||||
// list installed plugins
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin list installed",
|
||||
"plugin list installed","List install plugins",
|
||||
"plugin list installed",
|
||||
"plugin list installed","List install plugins",
|
||||
HandleConsoleListInstalledPlugin);
|
||||
|
||||
// list plugins available from registered repositories
|
||||
// list plugins available from registered repositories
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin list available",
|
||||
"plugin list available","List available plugins",
|
||||
"plugin list available","List available plugins",
|
||||
HandleConsoleListAvailablePlugin);
|
||||
// List available updates
|
||||
// List available updates
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin updates", "plugin updates","List availble updates",
|
||||
HandleConsoleListUpdates);
|
||||
|
||||
// Update plugin
|
||||
// Update plugin
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin update", "plugin update \"plugin index\"","Update the plugin",
|
||||
HandleConsoleUpdatePlugin);
|
||||
|
||||
// Add repository
|
||||
// Add repository
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo add", "repo add \"url\"","Add repository",
|
||||
HandleConsoleAddRepo);
|
||||
|
||||
// Refresh repo
|
||||
// Refresh repo
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo refresh", "repo refresh \"url\"", "Sync with a registered repository",
|
||||
HandleConsoleGetRepo);
|
||||
|
||||
// Remove repository from registry
|
||||
// Remove repository from registry
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo remove",
|
||||
"repo remove \"[url | index]\"",
|
||||
"Remove repository from registry",
|
||||
"repo remove \"[url | index]\"",
|
||||
"Remove repository from registry",
|
||||
HandleConsoleRemoveRepo);
|
||||
|
||||
// Enable repo
|
||||
// Enable repo
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo enable", "repo enable \"[url | index]\"",
|
||||
"Enable registered repository",
|
||||
"Enable registered repository",
|
||||
HandleConsoleEnableRepo);
|
||||
|
||||
// Disable repo
|
||||
// Disable repo
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo disable", "repo disable\"[url | index]\"",
|
||||
"Disable registered repository",
|
||||
"Disable registered repository",
|
||||
HandleConsoleDisableRepo);
|
||||
|
||||
// List registered repositories
|
||||
// List registered repositories
|
||||
MainConsole.Instance.Commands.AddCommand("Repository", true,
|
||||
"repo list", "repo list",
|
||||
"List registered repositories",
|
||||
"List registered repositories",
|
||||
HandleConsoleListRepos);
|
||||
|
||||
// *
|
||||
// *
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin info", "plugin info \"plugin index\"","Show detailed information for plugin",
|
||||
HandleConsoleShowAddinInfo);
|
||||
|
||||
// Plugin disable
|
||||
// Plugin disable
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin disable", "plugin disable \"plugin index\"",
|
||||
"Disable a plugin",
|
||||
"Disable a plugin",
|
||||
HandleConsoleDisablePlugin);
|
||||
|
||||
// Enable plugin
|
||||
// Enable plugin
|
||||
MainConsole.Instance.Commands.AddCommand("Plugin", true,
|
||||
"plugin enable", "plugin enable \"plugin index\"",
|
||||
"Enable the selected plugin plugin",
|
||||
"Enable the selected plugin plugin",
|
||||
HandleConsoleEnablePlugin);
|
||||
}
|
||||
|
||||
|
||||
#region console handlers
|
||||
// Handle our console commands
|
||||
//
|
||||
// Install plugin from registered repository
|
||||
/// <summary>
|
||||
/// Handles the console install plugin command. Attempts to install the selected plugin
|
||||
/// and
|
||||
/// and
|
||||
/// </summary>
|
||||
/// <param name='module'>
|
||||
/// Module.
|
||||
@@ -323,7 +323,7 @@ namespace OpenSim.Server.Base
|
||||
{
|
||||
if (cmd.Length >= 3)
|
||||
{
|
||||
|
||||
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
|
||||
int ndx = Convert.ToInt16(cmd[2]);
|
||||
@@ -355,5 +355,5 @@ namespace OpenSim.Server.Base
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user