mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Add proper handling for shared vs. unshared modules to the command
interface. Shared modules will now only get added once, so the command handler is called once per module, not once per scene. Removal of scenes has no adverse effects. Nonshared modules will be called for each scene.
This commit is contained in:
@@ -78,8 +78,8 @@ namespace OpenSim
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
MainConsole.Instance.Commands.AddCommand("hypergrid", "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand);
|
||||
MainConsole.Instance.Commands.AddCommand("hypergrid", "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand);
|
||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand);
|
||||
MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand);
|
||||
}
|
||||
|
||||
protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder)
|
||||
|
||||
@@ -99,185 +99,185 @@ namespace OpenSim
|
||||
m_console.SetGuiMode(m_gui);
|
||||
MainConsole.Instance = m_console;
|
||||
|
||||
m_console.Commands.AddCommand("region", "clear assets",
|
||||
m_console.Commands.AddCommand("region", false, "clear assets",
|
||||
"clear assets",
|
||||
"Clear the asset cache", HandleClearAssets);
|
||||
|
||||
m_console.Commands.AddCommand("region", "force update",
|
||||
m_console.Commands.AddCommand("region", false, "force update",
|
||||
"force update",
|
||||
"Force the update of all objects on clients",
|
||||
HandleForceUpdate);
|
||||
|
||||
m_console.Commands.AddCommand("region", "debug packet",
|
||||
m_console.Commands.AddCommand("region", false, "debug packet",
|
||||
"debug packet <level>",
|
||||
"Turn on packet debugging", Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", "debug scene",
|
||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||
"debug scene <cripting> <collisions> <physics>",
|
||||
"Turn on scene debugging", Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", "change region",
|
||||
m_console.Commands.AddCommand("region", false, "change region",
|
||||
"change region <region name>",
|
||||
"Change current console region", ChangeSelectedRegion);
|
||||
|
||||
m_console.Commands.AddCommand("region", "save xml",
|
||||
m_console.Commands.AddCommand("region", false, "save xml",
|
||||
"save xml",
|
||||
"Save a region's data in XML format", SaveXml);
|
||||
|
||||
m_console.Commands.AddCommand("region", "save xml2",
|
||||
m_console.Commands.AddCommand("region", false, "save xml2",
|
||||
"save xml2",
|
||||
"Save a region's data in XML2 format", SaveXml2);
|
||||
|
||||
m_console.Commands.AddCommand("region", "load xml",
|
||||
m_console.Commands.AddCommand("region", false, "load xml",
|
||||
"load xml [-newIDs [<x> <y> <z>]]",
|
||||
"Load a region's data from XML format", LoadXml);
|
||||
|
||||
m_console.Commands.AddCommand("region", "load xml2",
|
||||
m_console.Commands.AddCommand("region", false, "load xml2",
|
||||
"load xml2",
|
||||
"Load a region's data from XML2 format", LoadXml2);
|
||||
|
||||
m_console.Commands.AddCommand("region", "save prims xml2",
|
||||
m_console.Commands.AddCommand("region", false, "save prims xml2",
|
||||
"save prims xml2 [<prim name> <file name>]",
|
||||
"Save named prim to XML2", SavePrimsXml2);
|
||||
|
||||
m_console.Commands.AddCommand("region", "load oar",
|
||||
m_console.Commands.AddCommand("region", false, "load oar",
|
||||
"load oar <oar name>",
|
||||
"Load a region's data from OAR archive", LoadOar);
|
||||
|
||||
m_console.Commands.AddCommand("region", "save oar",
|
||||
m_console.Commands.AddCommand("region", false, "save oar",
|
||||
"save oar <oar name>",
|
||||
"Save a region's data to an OAR archive",
|
||||
"More information on forthcoming options here soon", SaveOar);
|
||||
|
||||
/*
|
||||
m_console.Commands.AddCommand("region", "save inventory",
|
||||
m_console.Commands.AddCommand("region", false, "save inventory",
|
||||
"save inventory <first> <last> <path> <file>",
|
||||
"Save user inventory data", SaveInv);
|
||||
|
||||
m_console.Commands.AddCommand("region", "load inventory",
|
||||
m_console.Commands.AddCommand("region", false, "load inventory",
|
||||
"load inventory <first> <last> <path> <file>",
|
||||
"Load user inventory data", LoadInv);
|
||||
*/
|
||||
|
||||
m_console.Commands.AddCommand("region", "edit scale",
|
||||
m_console.Commands.AddCommand("region", false, "edit scale",
|
||||
"edit scale <name> <x> <y> <z>",
|
||||
"Change the scale of a named prim", HandleEditScale);
|
||||
|
||||
m_console.Commands.AddCommand("region", "kick user",
|
||||
m_console.Commands.AddCommand("region", false, "kick user",
|
||||
"kick user <first> <last>",
|
||||
"Kick a user off the simulator", KickUserCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show assets",
|
||||
m_console.Commands.AddCommand("region", false, "show assets",
|
||||
"show assets",
|
||||
"Show asset data", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show users",
|
||||
m_console.Commands.AddCommand("region", false, "show users",
|
||||
"show users [full]",
|
||||
"Show user data", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show users full",
|
||||
m_console.Commands.AddCommand("region", false, "show users full",
|
||||
"show users full",
|
||||
String.Empty, HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show modules",
|
||||
m_console.Commands.AddCommand("region", false, "show modules",
|
||||
"show modules",
|
||||
"Show module data", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show regions",
|
||||
m_console.Commands.AddCommand("region", false, "show regions",
|
||||
"show regions",
|
||||
"Show region data", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "show queues",
|
||||
m_console.Commands.AddCommand("region", false, "show queues",
|
||||
"show queues",
|
||||
"Show queue data", HandleShow);
|
||||
|
||||
m_console.Commands.AddCommand("region", "alert",
|
||||
m_console.Commands.AddCommand("region", false, "alert",
|
||||
"alert <first> <last> <message>",
|
||||
"Send an alert to a user", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "alert general",
|
||||
m_console.Commands.AddCommand("region", false, "alert general",
|
||||
"alert general <message>",
|
||||
"Send an alert everyone", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "backup",
|
||||
m_console.Commands.AddCommand("region", false, "backup",
|
||||
"backup",
|
||||
"Persist objects to the database now", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "create region",
|
||||
m_console.Commands.AddCommand("region", false, "create region",
|
||||
"create region",
|
||||
"Create a new region", HandleCreateRegion);
|
||||
|
||||
m_console.Commands.AddCommand("region", "login enable",
|
||||
m_console.Commands.AddCommand("region", false, "login enable",
|
||||
"login enable",
|
||||
"Enable logins to the simulator", HandleLoginEnable);
|
||||
|
||||
m_console.Commands.AddCommand("region", "login disable",
|
||||
m_console.Commands.AddCommand("region", false, "login disable",
|
||||
"login disable",
|
||||
"Disable logins to the simulator", HandleLoginDisable);
|
||||
|
||||
m_console.Commands.AddCommand("region", "login status",
|
||||
m_console.Commands.AddCommand("region", false, "login status",
|
||||
"login status",
|
||||
"Display status of logins", HandleLoginStatus);
|
||||
|
||||
m_console.Commands.AddCommand("region", "restart",
|
||||
m_console.Commands.AddCommand("region", false, "restart",
|
||||
"restart",
|
||||
"Restart all sims in this instance", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "config set",
|
||||
m_console.Commands.AddCommand("region", false, "config set",
|
||||
"config set <section> <field> <value>",
|
||||
"Set a config option", HandleConfig);
|
||||
|
||||
m_console.Commands.AddCommand("region", "config get",
|
||||
m_console.Commands.AddCommand("region", false, "config get",
|
||||
"config get <section> <field>",
|
||||
"Read a config option", HandleConfig);
|
||||
|
||||
m_console.Commands.AddCommand("region", "config save",
|
||||
m_console.Commands.AddCommand("region", false, "config save",
|
||||
"config save",
|
||||
"Save current configuration", HandleConfig);
|
||||
|
||||
m_console.Commands.AddCommand("region", "command-script",
|
||||
m_console.Commands.AddCommand("region", false, "command-script",
|
||||
"command-script <script>",
|
||||
"Run a command script from file", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "export-map",
|
||||
m_console.Commands.AddCommand("region", false, "export-map",
|
||||
"export-map <file>",
|
||||
"Save an image of the world map", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "remove-region",
|
||||
m_console.Commands.AddCommand("region", false, "remove-region",
|
||||
"remove-region <name>",
|
||||
"Remove a region from this simulator", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "delete-region",
|
||||
m_console.Commands.AddCommand("region", false, "delete-region",
|
||||
"delete-region <name>",
|
||||
"Delete a region from disk", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "predecode-j2k",
|
||||
m_console.Commands.AddCommand("region", false, "predecode-j2k",
|
||||
"predecode-j2k [<num threads>]>",
|
||||
"Precache assets,decode j2k layerdata", RunCommand);
|
||||
|
||||
m_console.Commands.AddCommand("region", "modules list",
|
||||
m_console.Commands.AddCommand("region", false, "modules list",
|
||||
"modules list",
|
||||
"List modules", HandleModules);
|
||||
|
||||
m_console.Commands.AddCommand("region", "modules load",
|
||||
m_console.Commands.AddCommand("region", false, "modules load",
|
||||
"modules load <name>",
|
||||
"Load a module", HandleModules);
|
||||
|
||||
m_console.Commands.AddCommand("region", "modules unload",
|
||||
m_console.Commands.AddCommand("region", false, "modules unload",
|
||||
"modules unload <name>",
|
||||
"Unload a module", HandleModules);
|
||||
|
||||
m_console.Commands.AddCommand("region", "Add-InventoryHost",
|
||||
m_console.Commands.AddCommand("region", false, "Add-InventoryHost",
|
||||
"Add-InventoryHost <host>",
|
||||
String.Empty, RunCommand);
|
||||
|
||||
if (ConfigurationSettings.Standalone)
|
||||
{
|
||||
m_console.Commands.AddCommand("region", "create user",
|
||||
m_console.Commands.AddCommand("region", false, "create user",
|
||||
"create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]",
|
||||
"Create a new user", HandleCreateUser);
|
||||
|
||||
m_console.Commands.AddCommand("region", "reset user password",
|
||||
m_console.Commands.AddCommand("region", false, "reset user password",
|
||||
"reset user password [<first> [<last> [<password>]]]",
|
||||
"Reset a user password", HandleResetUserPassword);
|
||||
}
|
||||
|
||||
@@ -203,12 +203,12 @@ namespace OpenSim
|
||||
|
||||
foreach (string topic in topics)
|
||||
{
|
||||
m_console.Commands.AddCommand("plugin", "help " + topic,
|
||||
m_console.Commands.AddCommand("plugin", false, "help " + topic,
|
||||
"help " + topic,
|
||||
"Get help on plugin command '" + topic + "'",
|
||||
HandleCommanderHelp);
|
||||
|
||||
m_console.Commands.AddCommand("plugin", topic,
|
||||
m_console.Commands.AddCommand("plugin", false, topic,
|
||||
topic,
|
||||
"Execute subcommand for plugin '" + topic + "'",
|
||||
null);
|
||||
@@ -221,7 +221,8 @@ namespace OpenSim
|
||||
|
||||
foreach (string command in commander.Commands.Keys)
|
||||
{
|
||||
m_console.Commands.AddCommand(topic, topic + " " + command,
|
||||
m_console.Commands.AddCommand(topic, false,
|
||||
topic + " " + command,
|
||||
topic + " " + commander.Commands[command].ShortHelp(),
|
||||
String.Empty, HandleCommanderCommand);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user