From baefa05b575b28e1ed08670e9c937ca307f09269 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 4 Feb 2008 18:52:24 +0000 Subject: * Rebase all current servers on common abstract BaseOpenSimServer class * The immediate upshot is that "show uptime" from the console will now show uptime on all server types (user, asset, grid, etc) * DEV: This refactoring is far from complete - only just enough to makes the "show uptime" command common accross the servers. More is needed, but in this case it's somewhat like eating cabbage, which I prefer not to do all at once --- OpenSim/Grid/InventoryServer/Main.cs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'OpenSim/Grid/InventoryServer/Main.cs') diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index ce371bf..b62c696 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs @@ -36,9 +36,8 @@ using OpenSim.Framework.Servers; namespace OpenSim.Grid.InventoryServer { - public class OpenInventory_Main : conscmd_callback + public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback { - private LogBase m_console; private InventoryManager m_inventoryManager; private InventoryConfig m_config; private GridInventoryService m_inventoryService; @@ -56,8 +55,8 @@ namespace OpenSim.Grid.InventoryServer public OpenInventory_Main() { - m_console = new LogBase("opengrid-inventory-console.log", LogName, this, true); - MainLog.Instance = m_console; + m_log = new LogBase("opengrid-inventory-console.log", LogName, this, true); + MainLog.Instance = m_log; } public void Startup() @@ -104,16 +103,18 @@ namespace OpenSim.Grid.InventoryServer private void Work() { - m_console.Notice("Enter help for a list of commands\n"); + m_log.Notice("Enter help for a list of commands\n"); while (true) { - m_console.MainLogPrompt(); + m_log.MainLogPrompt(); } } - public void RunCmd(string cmd, string[] cmdparams) + public override void RunCmd(string cmd, string[] cmdparams) { + base.RunCmd(cmd, cmdparams); + switch (cmd) { case "quit": @@ -121,14 +122,10 @@ namespace OpenSim.Grid.InventoryServer m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); break; case "shutdown": - m_console.Close(); + m_log.Close(); Environment.Exit(0); break; } } - - public void Show(string ShowWhat) - { - } } -} \ No newline at end of file +} -- cgit v1.1