aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/InventoryServer/Main.cs
diff options
context:
space:
mode:
authorMelanie Thielker2009-02-07 12:25:39 +0000
committerMelanie Thielker2009-02-07 12:25:39 +0000
commit54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a (patch)
treef606cbdbc383ec21fee28f0a1454140a1c714278 /OpenSim/Grid/InventoryServer/Main.cs
parentThank you dslake for a patch that: (diff)
downloadopensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.zip
opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.gz
opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.bz2
opensim-SC-54c6a920baa0ef02a9ea09e08cc1effcef3b0a3a.tar.xz
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.
Diffstat (limited to 'OpenSim/Grid/InventoryServer/Main.cs')
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs21
1 files changed, 10 insertions, 11 deletions
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;
38 38
39namespace OpenSim.Grid.InventoryServer 39namespace OpenSim.Grid.InventoryServer
40{ 40{
41 public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback 41 public class OpenInventory_Main : BaseOpenSimServer
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
@@ -58,7 +58,7 @@ namespace OpenSim.Grid.InventoryServer
58 58
59 public OpenInventory_Main() 59 public OpenInventory_Main()
60 { 60 {
61 m_console = new ConsoleBase("Inventory", this); 61 m_console = new ConsoleBase("Inventory");
62 MainConsole.Instance = m_console; 62 MainConsole.Instance = m_console;
63 } 63 }
64 64
@@ -77,6 +77,12 @@ namespace OpenSim.Grid.InventoryServer
77 m_httpServer.Start(); 77 m_httpServer.Start();
78 78
79 m_log.Info("[" + LogName + "]: Started HTTP server"); 79 m_log.Info("[" + LogName + "]: Started HTTP server");
80
81 base.StartupSpecific();
82
83 m_console.Commands.AddCommand("inventoryserver", "add user",
84 "add user",
85 "Add a random user inventory", HandleAddUser);
80 } 86 }
81 87
82 protected void AddHttpHandlers() 88 protected void AddHttpHandlers()
@@ -146,16 +152,9 @@ namespace OpenSim.Grid.InventoryServer
146 } 152 }
147 } 153 }
148 154
149 public override void RunCmd(string cmd, string[] cmdparams) 155 private void HandleAddUser(string module, string[] args)
150 { 156 {
151 base.RunCmd(cmd, cmdparams); 157 m_inventoryService.CreateUsersInventory(UUID.Random().Guid);
152
153 switch (cmd)
154 {
155 case "add-user":
156 m_inventoryService.CreateUsersInventory(UUID.Random().Guid);
157 break;
158 }
159 } 158 }
160 } 159 }
161} 160}