diff options
author | Justin Clarke Casey | 2008-02-04 18:52:24 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-04 18:52:24 +0000 |
commit | baefa05b575b28e1ed08670e9c937ca307f09269 (patch) | |
tree | 8f9703391fe86df4ecc1008a140e1ea760c1ae1b /OpenSim/Grid/InventoryServer/Main.cs | |
parent | Change sim command from "stats" to "show stats" for consistency (diff) | |
download | opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.zip opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.gz opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.bz2 opensim-SC_OLD-baefa05b575b28e1ed08670e9c937ca307f09269.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Grid/InventoryServer/Main.cs')
-rw-r--r-- | OpenSim/Grid/InventoryServer/Main.cs | 23 |
1 files changed, 10 insertions, 13 deletions
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; | |||
36 | 36 | ||
37 | namespace OpenSim.Grid.InventoryServer | 37 | namespace OpenSim.Grid.InventoryServer |
38 | { | 38 | { |
39 | public class OpenInventory_Main : conscmd_callback | 39 | public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback |
40 | { | 40 | { |
41 | private LogBase m_console; | ||
42 | private InventoryManager m_inventoryManager; | 41 | private InventoryManager m_inventoryManager; |
43 | private InventoryConfig m_config; | 42 | private InventoryConfig m_config; |
44 | private GridInventoryService m_inventoryService; | 43 | private GridInventoryService m_inventoryService; |
@@ -56,8 +55,8 @@ namespace OpenSim.Grid.InventoryServer | |||
56 | 55 | ||
57 | public OpenInventory_Main() | 56 | public OpenInventory_Main() |
58 | { | 57 | { |
59 | m_console = new LogBase("opengrid-inventory-console.log", LogName, this, true); | 58 | m_log = new LogBase("opengrid-inventory-console.log", LogName, this, true); |
60 | MainLog.Instance = m_console; | 59 | MainLog.Instance = m_log; |
61 | } | 60 | } |
62 | 61 | ||
63 | public void Startup() | 62 | public void Startup() |
@@ -104,16 +103,18 @@ namespace OpenSim.Grid.InventoryServer | |||
104 | 103 | ||
105 | private void Work() | 104 | private void Work() |
106 | { | 105 | { |
107 | m_console.Notice("Enter help for a list of commands\n"); | 106 | m_log.Notice("Enter help for a list of commands\n"); |
108 | 107 | ||
109 | while (true) | 108 | while (true) |
110 | { | 109 | { |
111 | m_console.MainLogPrompt(); | 110 | m_log.MainLogPrompt(); |
112 | } | 111 | } |
113 | } | 112 | } |
114 | 113 | ||
115 | public void RunCmd(string cmd, string[] cmdparams) | 114 | public override void RunCmd(string cmd, string[] cmdparams) |
116 | { | 115 | { |
116 | base.RunCmd(cmd, cmdparams); | ||
117 | |||
117 | switch (cmd) | 118 | switch (cmd) |
118 | { | 119 | { |
119 | case "quit": | 120 | case "quit": |
@@ -121,14 +122,10 @@ namespace OpenSim.Grid.InventoryServer | |||
121 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); | 122 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); |
122 | break; | 123 | break; |
123 | case "shutdown": | 124 | case "shutdown": |
124 | m_console.Close(); | 125 | m_log.Close(); |
125 | Environment.Exit(0); | 126 | Environment.Exit(0); |
126 | break; | 127 | break; |
127 | } | 128 | } |
128 | } | 129 | } |
129 | |||
130 | public void Show(string ShowWhat) | ||
131 | { | ||
132 | } | ||
133 | } | 130 | } |
134 | } \ No newline at end of file | 131 | } |