From 54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Feb 2009 12:25:39 +0000 Subject: Replace the console for all OpenSim apps with a new console featuring command line editing, context sensitive help (press ? at any time), command line history, a new plugin command system and new appender features thet let you type while the console is scrolling. Seamlessly integrates the ICommander interfaces. --- OpenSim/Grid/InventoryServer/Main.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'OpenSim/Grid/InventoryServer/Main.cs') diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 81a6a03..4727f6e 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs @@ -38,7 +38,7 @@ using OpenSim.Framework.Servers; namespace OpenSim.Grid.InventoryServer { - public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback + public class OpenInventory_Main : BaseOpenSimServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -58,7 +58,7 @@ namespace OpenSim.Grid.InventoryServer public OpenInventory_Main() { - m_console = new ConsoleBase("Inventory", this); + m_console = new ConsoleBase("Inventory"); MainConsole.Instance = m_console; } @@ -77,6 +77,12 @@ namespace OpenSim.Grid.InventoryServer m_httpServer.Start(); m_log.Info("[" + LogName + "]: Started HTTP server"); + + base.StartupSpecific(); + + m_console.Commands.AddCommand("inventoryserver", "add user", + "add user", + "Add a random user inventory", HandleAddUser); } protected void AddHttpHandlers() @@ -146,16 +152,9 @@ namespace OpenSim.Grid.InventoryServer } } - public override void RunCmd(string cmd, string[] cmdparams) + private void HandleAddUser(string module, string[] args) { - base.RunCmd(cmd, cmdparams); - - switch (cmd) - { - case "add-user": - m_inventoryService.CreateUsersInventory(UUID.Random().Guid); - break; - } + m_inventoryService.CreateUsersInventory(UUID.Random().Guid); } } } -- cgit v1.1