diff options
author | lbsa71 | 2009-03-10 20:27:41 +0000 |
---|---|---|
committer | lbsa71 | 2009-03-10 20:27:41 +0000 |
commit | 91a096dca6adc62bb6b185d391a8d2181291e9a3 (patch) | |
tree | 748fdbd1eee8a4bb907481241c0a19664b309b11 /OpenSim/Region/Application/OpenSim.cs | |
parent | * Cleanup and CCC (Code Convention Conformance) (diff) | |
download | opensim-SC_OLD-91a096dca6adc62bb6b185d391a8d2181291e9a3.zip opensim-SC_OLD-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.gz opensim-SC_OLD-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.bz2 opensim-SC_OLD-91a096dca6adc62bb6b185d391a8d2181291e9a3.tar.xz |
* Cleanup and CCC (Code Convention Conformance)
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 345 |
1 files changed, 174 insertions, 171 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 920d35c..69dfac5 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -85,7 +85,8 @@ namespace OpenSim | |||
85 | m_log.Info("===================================================================="); | 85 | m_log.Info("===================================================================="); |
86 | m_log.Info("========================= STARTING OPENSIM ========================="); | 86 | m_log.Info("========================= STARTING OPENSIM ========================="); |
87 | m_log.Info("===================================================================="); | 87 | m_log.Info("===================================================================="); |
88 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", (ConfigurationSettings.Standalone ? "sandbox" : "grid")); | 88 | m_log.InfoFormat("[OPENSIM MAIN]: Running in {0} mode", |
89 | (ConfigurationSettings.Standalone ? "sandbox" : "grid")); | ||
89 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); | 90 | //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); |
90 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx | 91 | // http://msdn.microsoft.com/en-us/library/bb384202.aspx |
91 | //GCSettings.LatencyMode = GCLatencyMode.Batch; | 92 | //GCSettings.LatencyMode = GCLatencyMode.Batch; |
@@ -100,7 +101,7 @@ namespace OpenSim | |||
100 | base.StartupSpecific(); | 101 | base.StartupSpecific(); |
101 | 102 | ||
102 | //Run Startup Commands | 103 | //Run Startup Commands |
103 | if (String.IsNullOrEmpty( m_startupCommandsFile )) | 104 | if (String.IsNullOrEmpty(m_startupCommandsFile)) |
104 | { | 105 | { |
105 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); | 106 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); |
106 | } | 107 | } |
@@ -114,7 +115,7 @@ namespace OpenSim | |||
114 | { | 115 | { |
115 | m_scriptTimer = new Timer(); | 116 | m_scriptTimer = new Timer(); |
116 | m_scriptTimer.Enabled = true; | 117 | m_scriptTimer.Enabled = true; |
117 | m_scriptTimer.Interval = 1200 * 1000; | 118 | m_scriptTimer.Interval = 1200*1000; |
118 | m_scriptTimer.Elapsed += RunAutoTimerScript; | 119 | m_scriptTimer.Elapsed += RunAutoTimerScript; |
119 | } | 120 | } |
120 | 121 | ||
@@ -122,7 +123,8 @@ namespace OpenSim | |||
122 | 123 | ||
123 | // For now, start at the 'root' level by default | 124 | // For now, start at the 'root' level by default |
124 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | 125 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it |
125 | ChangeSelectedRegion("region", new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); | 126 | ChangeSelectedRegion("region", |
127 | new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); | ||
126 | else | 128 | else |
127 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); | 129 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); |
128 | } | 130 | } |
@@ -130,164 +132,164 @@ namespace OpenSim | |||
130 | private void RegisterConsoleCommands() | 132 | private void RegisterConsoleCommands() |
131 | { | 133 | { |
132 | m_console.Commands.AddCommand("region", false, "clear assets", | 134 | m_console.Commands.AddCommand("region", false, "clear assets", |
133 | "clear assets", | 135 | "clear assets", |
134 | "Clear the asset cache", HandleClearAssets); | 136 | "Clear the asset cache", HandleClearAssets); |
135 | 137 | ||
136 | m_console.Commands.AddCommand("region", false, "force update", | 138 | m_console.Commands.AddCommand("region", false, "force update", |
137 | "force update", | 139 | "force update", |
138 | "Force the update of all objects on clients", | 140 | "Force the update of all objects on clients", |
139 | HandleForceUpdate); | 141 | HandleForceUpdate); |
140 | 142 | ||
141 | m_console.Commands.AddCommand("region", false, "debug packet", | 143 | m_console.Commands.AddCommand("region", false, "debug packet", |
142 | "debug packet <level>", | 144 | "debug packet <level>", |
143 | "Turn on packet debugging", Debug); | 145 | "Turn on packet debugging", Debug); |
144 | 146 | ||
145 | m_console.Commands.AddCommand("region", false, "debug scene", | 147 | m_console.Commands.AddCommand("region", false, "debug scene", |
146 | "debug scene <cripting> <collisions> <physics>", | 148 | "debug scene <cripting> <collisions> <physics>", |
147 | "Turn on scene debugging", Debug); | 149 | "Turn on scene debugging", Debug); |
148 | 150 | ||
149 | m_console.Commands.AddCommand("region", false, "change region", | 151 | m_console.Commands.AddCommand("region", false, "change region", |
150 | "change region <region name>", | 152 | "change region <region name>", |
151 | "Change current console region", ChangeSelectedRegion); | 153 | "Change current console region", ChangeSelectedRegion); |
152 | 154 | ||
153 | m_console.Commands.AddCommand("region", false, "save xml", | 155 | m_console.Commands.AddCommand("region", false, "save xml", |
154 | "save xml", | 156 | "save xml", |
155 | "Save a region's data in XML format", SaveXml); | 157 | "Save a region's data in XML format", SaveXml); |
156 | 158 | ||
157 | m_console.Commands.AddCommand("region", false, "save xml2", | 159 | m_console.Commands.AddCommand("region", false, "save xml2", |
158 | "save xml2", | 160 | "save xml2", |
159 | "Save a region's data in XML2 format", SaveXml2); | 161 | "Save a region's data in XML2 format", SaveXml2); |
160 | 162 | ||
161 | m_console.Commands.AddCommand("region", false, "load xml", | 163 | m_console.Commands.AddCommand("region", false, "load xml", |
162 | "load xml [-newIDs [<x> <y> <z>]]", | 164 | "load xml [-newIDs [<x> <y> <z>]]", |
163 | "Load a region's data from XML format", LoadXml); | 165 | "Load a region's data from XML format", LoadXml); |
164 | 166 | ||
165 | m_console.Commands.AddCommand("region", false, "load xml2", | 167 | m_console.Commands.AddCommand("region", false, "load xml2", |
166 | "load xml2", | 168 | "load xml2", |
167 | "Load a region's data from XML2 format", LoadXml2); | 169 | "Load a region's data from XML2 format", LoadXml2); |
168 | 170 | ||
169 | m_console.Commands.AddCommand("region", false, "save prims xml2", | 171 | m_console.Commands.AddCommand("region", false, "save prims xml2", |
170 | "save prims xml2 [<prim name> <file name>]", | 172 | "save prims xml2 [<prim name> <file name>]", |
171 | "Save named prim to XML2", SavePrimsXml2); | 173 | "Save named prim to XML2", SavePrimsXml2); |
172 | 174 | ||
173 | m_console.Commands.AddCommand("region", false, "load oar", | 175 | m_console.Commands.AddCommand("region", false, "load oar", |
174 | "load oar <oar name>", | 176 | "load oar <oar name>", |
175 | "Load a region's data from OAR archive", LoadOar); | 177 | "Load a region's data from OAR archive", LoadOar); |
176 | 178 | ||
177 | m_console.Commands.AddCommand("region", false, "save oar", | 179 | m_console.Commands.AddCommand("region", false, "save oar", |
178 | "save oar <oar name>", | 180 | "save oar <oar name>", |
179 | "Save a region's data to an OAR archive", | 181 | "Save a region's data to an OAR archive", |
180 | "More information on forthcoming options here soon", SaveOar); | 182 | "More information on forthcoming options here soon", SaveOar); |
181 | 183 | ||
182 | m_console.Commands.AddCommand("region", false, "edit scale", | 184 | m_console.Commands.AddCommand("region", false, "edit scale", |
183 | "edit scale <name> <x> <y> <z>", | 185 | "edit scale <name> <x> <y> <z>", |
184 | "Change the scale of a named prim", HandleEditScale); | 186 | "Change the scale of a named prim", HandleEditScale); |
185 | 187 | ||
186 | m_console.Commands.AddCommand("region", false, "kick user", | 188 | m_console.Commands.AddCommand("region", false, "kick user", |
187 | "kick user <first> <last>", | 189 | "kick user <first> <last>", |
188 | "Kick a user off the simulator", KickUserCommand); | 190 | "Kick a user off the simulator", KickUserCommand); |
189 | 191 | ||
190 | m_console.Commands.AddCommand("region", false, "show assets", | 192 | m_console.Commands.AddCommand("region", false, "show assets", |
191 | "show assets", | 193 | "show assets", |
192 | "Show asset data", HandleShow); | 194 | "Show asset data", HandleShow); |
193 | 195 | ||
194 | m_console.Commands.AddCommand("region", false, "show users", | 196 | m_console.Commands.AddCommand("region", false, "show users", |
195 | "show users [full]", | 197 | "show users [full]", |
196 | "Show user data", HandleShow); | 198 | "Show user data", HandleShow); |
197 | 199 | ||
198 | m_console.Commands.AddCommand("region", false, "show users full", | 200 | m_console.Commands.AddCommand("region", false, "show users full", |
199 | "show users full", | 201 | "show users full", |
200 | String.Empty, HandleShow); | 202 | String.Empty, HandleShow); |
201 | 203 | ||
202 | m_console.Commands.AddCommand("region", false, "show modules", | 204 | m_console.Commands.AddCommand("region", false, "show modules", |
203 | "show modules", | 205 | "show modules", |
204 | "Show module data", HandleShow); | 206 | "Show module data", HandleShow); |
205 | 207 | ||
206 | m_console.Commands.AddCommand("region", false, "show regions", | 208 | m_console.Commands.AddCommand("region", false, "show regions", |
207 | "show regions", | 209 | "show regions", |
208 | "Show region data", HandleShow); | 210 | "Show region data", HandleShow); |
209 | 211 | ||
210 | m_console.Commands.AddCommand("region", false, "show queues", | 212 | m_console.Commands.AddCommand("region", false, "show queues", |
211 | "show queues", | 213 | "show queues", |
212 | "Show queue data", HandleShow); | 214 | "Show queue data", HandleShow); |
213 | 215 | ||
214 | m_console.Commands.AddCommand("region", false, "backup", | 216 | m_console.Commands.AddCommand("region", false, "backup", |
215 | "backup", | 217 | "backup", |
216 | "Persist objects to the database now", RunCommand); | 218 | "Persist objects to the database now", RunCommand); |
217 | 219 | ||
218 | m_console.Commands.AddCommand("region", false, "create region", | 220 | m_console.Commands.AddCommand("region", false, "create region", |
219 | "create region", | 221 | "create region", |
220 | "Create a new region", HandleCreateRegion); | 222 | "Create a new region", HandleCreateRegion); |
221 | 223 | ||
222 | m_console.Commands.AddCommand("region", false, "login enable", | 224 | m_console.Commands.AddCommand("region", false, "login enable", |
223 | "login enable", | 225 | "login enable", |
224 | "Enable logins to the simulator", HandleLoginEnable); | 226 | "Enable logins to the simulator", HandleLoginEnable); |
225 | 227 | ||
226 | m_console.Commands.AddCommand("region", false, "login disable", | 228 | m_console.Commands.AddCommand("region", false, "login disable", |
227 | "login disable", | 229 | "login disable", |
228 | "Disable logins to the simulator", HandleLoginDisable); | 230 | "Disable logins to the simulator", HandleLoginDisable); |
229 | 231 | ||
230 | m_console.Commands.AddCommand("region", false, "login status", | 232 | m_console.Commands.AddCommand("region", false, "login status", |
231 | "login status", | 233 | "login status", |
232 | "Display status of logins", HandleLoginStatus); | 234 | "Display status of logins", HandleLoginStatus); |
233 | 235 | ||
234 | m_console.Commands.AddCommand("region", false, "restart", | 236 | m_console.Commands.AddCommand("region", false, "restart", |
235 | "restart", | 237 | "restart", |
236 | "Restart all sims in this instance", RunCommand); | 238 | "Restart all sims in this instance", RunCommand); |
237 | 239 | ||
238 | m_console.Commands.AddCommand("region", false, "config set", | 240 | m_console.Commands.AddCommand("region", false, "config set", |
239 | "config set <section> <field> <value>", | 241 | "config set <section> <field> <value>", |
240 | "Set a config option", HandleConfig); | 242 | "Set a config option", HandleConfig); |
241 | 243 | ||
242 | m_console.Commands.AddCommand("region", false, "config get", | 244 | m_console.Commands.AddCommand("region", false, "config get", |
243 | "config get <section> <field>", | 245 | "config get <section> <field>", |
244 | "Read a config option", HandleConfig); | 246 | "Read a config option", HandleConfig); |
245 | 247 | ||
246 | m_console.Commands.AddCommand("region", false, "config save", | 248 | m_console.Commands.AddCommand("region", false, "config save", |
247 | "config save", | 249 | "config save", |
248 | "Save current configuration", HandleConfig); | 250 | "Save current configuration", HandleConfig); |
249 | 251 | ||
250 | m_console.Commands.AddCommand("region", false, "command-script", | 252 | m_console.Commands.AddCommand("region", false, "command-script", |
251 | "command-script <script>", | 253 | "command-script <script>", |
252 | "Run a command script from file", RunCommand); | 254 | "Run a command script from file", RunCommand); |
253 | 255 | ||
254 | m_console.Commands.AddCommand("region", false, "remove-region", | 256 | m_console.Commands.AddCommand("region", false, "remove-region", |
255 | "remove-region <name>", | 257 | "remove-region <name>", |
256 | "Remove a region from this simulator", RunCommand); | 258 | "Remove a region from this simulator", RunCommand); |
257 | 259 | ||
258 | m_console.Commands.AddCommand("region", false, "delete-region", | 260 | m_console.Commands.AddCommand("region", false, "delete-region", |
259 | "delete-region <name>", | 261 | "delete-region <name>", |
260 | "Delete a region from disk", RunCommand); | 262 | "Delete a region from disk", RunCommand); |
261 | 263 | ||
262 | m_console.Commands.AddCommand("region", false, "predecode-j2k", | 264 | m_console.Commands.AddCommand("region", false, "predecode-j2k", |
263 | "predecode-j2k [<num threads>]>", | 265 | "predecode-j2k [<num threads>]>", |
264 | "Precache assets,decode j2k layerdata", RunCommand); | 266 | "Precache assets,decode j2k layerdata", RunCommand); |
265 | 267 | ||
266 | m_console.Commands.AddCommand("region", false, "modules list", | 268 | m_console.Commands.AddCommand("region", false, "modules list", |
267 | "modules list", | 269 | "modules list", |
268 | "List modules", HandleModules); | 270 | "List modules", HandleModules); |
269 | 271 | ||
270 | m_console.Commands.AddCommand("region", false, "modules load", | 272 | m_console.Commands.AddCommand("region", false, "modules load", |
271 | "modules load <name>", | 273 | "modules load <name>", |
272 | "Load a module", HandleModules); | 274 | "Load a module", HandleModules); |
273 | 275 | ||
274 | m_console.Commands.AddCommand("region", false, "modules unload", | 276 | m_console.Commands.AddCommand("region", false, "modules unload", |
275 | "modules unload <name>", | 277 | "modules unload <name>", |
276 | "Unload a module", HandleModules); | 278 | "Unload a module", HandleModules); |
277 | 279 | ||
278 | m_console.Commands.AddCommand("region", false, "Add-InventoryHost", | 280 | m_console.Commands.AddCommand("region", false, "Add-InventoryHost", |
279 | "Add-InventoryHost <host>", | 281 | "Add-InventoryHost <host>", |
280 | String.Empty, RunCommand); | 282 | String.Empty, RunCommand); |
281 | 283 | ||
282 | if (ConfigurationSettings.Standalone) | 284 | if (ConfigurationSettings.Standalone) |
283 | { | 285 | { |
284 | m_console.Commands.AddCommand("region", false, "create user", | 286 | m_console.Commands.AddCommand("region", false, "create user", |
285 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", | 287 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", |
286 | "Create a new user", HandleCreateUser); | 288 | "Create a new user", HandleCreateUser); |
287 | 289 | ||
288 | m_console.Commands.AddCommand("region", false, "reset user password", | 290 | m_console.Commands.AddCommand("region", false, "reset user password", |
289 | "reset user password [<first> [<last> [<password>]]]", | 291 | "reset user password [<first> [<last> [<password>]]]", |
290 | "Reset a user password", HandleResetUserPassword); | 292 | "Reset a user password", HandleResetUserPassword); |
291 | } | 293 | } |
292 | } | 294 | } |
293 | 295 | ||
@@ -321,15 +323,16 @@ namespace OpenSim | |||
321 | { | 323 | { |
322 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); | 324 | RegionInfo regionInfo = m_sceneManager.GetRegionInfo(presence.RegionHandle); |
323 | 325 | ||
324 | if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) | 326 | if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) && |
327 | presence.Lastname.ToLower().Contains(cmdparams[3].ToLower())) | ||
325 | { | 328 | { |
326 | m_console.Notice( | 329 | m_console.Notice( |
327 | String.Format( | 330 | String.Format( |
328 | "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", | 331 | "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", |
329 | presence.Firstname, | 332 | presence.Firstname, |
330 | presence.Lastname, | 333 | presence.Lastname, |
331 | presence.UUID, | 334 | presence.UUID, |
332 | regionInfo.RegionName)); | 335 | regionInfo.RegionName)); |
333 | 336 | ||
334 | presence.Scene.IncomingCloseAgent(presence.UUID); | 337 | presence.Scene.IncomingCloseAgent(presence.UUID); |
335 | } | 338 | } |
@@ -458,9 +461,9 @@ namespace OpenSim | |||
458 | } | 461 | } |
459 | else | 462 | else |
460 | { | 463 | { |
461 | // IConfig c = DefaultConfig().Configs[cmdparams[1]]; | 464 | // IConfig c = DefaultConfig().Configs[cmdparams[1]]; |
462 | // if (c == null) | 465 | // if (c == null) |
463 | // c = DefaultConfig().AddConfig(cmdparams[1]); | 466 | // c = DefaultConfig().AddConfig(cmdparams[1]); |
464 | IConfig c; | 467 | IConfig c; |
465 | IConfigSource source = new IniConfigSource(); | 468 | IConfigSource source = new IniConfigSource(); |
466 | c = source.AddConfig(cmdparams[1]); | 469 | c = source.AddConfig(cmdparams[1]); |
@@ -471,11 +474,11 @@ namespace OpenSim | |||
471 | m_config.Source.Merge(source); | 474 | m_config.Source.Merge(source); |
472 | 475 | ||
473 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + | 476 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + |
474 | _value); | 477 | _value); |
475 | } | 478 | } |
476 | } | 479 | } |
477 | break; | 480 | break; |
478 | 481 | ||
479 | case "get": | 482 | case "get": |
480 | if (cmdparams.Length < 3) | 483 | if (cmdparams.Length < 3) |
481 | { | 484 | { |
@@ -498,7 +501,7 @@ namespace OpenSim | |||
498 | } | 501 | } |
499 | 502 | ||
500 | break; | 503 | break; |
501 | 504 | ||
502 | case "save": | 505 | case "save": |
503 | m_console.Notice("Saving configuration file: " + Application.iniFilePath); | 506 | m_console.Notice("Saving configuration file: " + Application.iniFilePath); |
504 | m_config.Save(Application.iniFilePath); | 507 | m_config.Save(Application.iniFilePath); |
@@ -541,7 +544,6 @@ namespace OpenSim | |||
541 | { | 544 | { |
542 | foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) | 545 | foreach (Scene s in new ArrayList(m_sceneManager.Scenes)) |
543 | { | 546 | { |
544 | |||
545 | m_console.Notice("Loading module: " + cmdparams[1]); | 547 | m_console.Notice("Loading module: " + cmdparams[1]); |
546 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); | 548 | m_moduleLoader.LoadRegionModules(cmdparams[1], s); |
547 | } | 549 | } |
@@ -569,58 +571,58 @@ namespace OpenSim | |||
569 | 571 | ||
570 | switch (command) | 572 | switch (command) |
571 | { | 573 | { |
572 | case "command-script": | 574 | case "command-script": |
573 | if (cmdparams.Length > 0) | 575 | if (cmdparams.Length > 0) |
574 | { | 576 | { |
575 | RunCommandScript(cmdparams[0]); | 577 | RunCommandScript(cmdparams[0]); |
576 | } | 578 | } |
577 | break; | 579 | break; |
578 | |||
579 | case "backup": | ||
580 | m_sceneManager.BackupCurrentScene(); | ||
581 | break; | ||
582 | |||
583 | case "remove-region": | ||
584 | string regRemoveName = CombineParams(cmdparams, 0); | ||
585 | |||
586 | Scene removeScene; | ||
587 | if (m_sceneManager.TryGetScene(regRemoveName, out removeScene)) | ||
588 | RemoveRegion(removeScene, false); | ||
589 | else | ||
590 | m_console.Error("no region with that name"); | ||
591 | break; | ||
592 | |||
593 | case "delete-region": | ||
594 | string regDeleteName = CombineParams(cmdparams, 0); | ||
595 | |||
596 | Scene killScene; | ||
597 | if (m_sceneManager.TryGetScene(regDeleteName, out killScene)) | ||
598 | RemoveRegion(killScene, true); | ||
599 | else | ||
600 | m_console.Error("no region with that name"); | ||
601 | break; | ||
602 | |||
603 | case "restart": | ||
604 | m_sceneManager.RestartCurrentScene(); | ||
605 | break; | ||
606 | |||
607 | case "Add-InventoryHost": | ||
608 | if (cmdparams.Length > 0) | ||
609 | { | ||
610 | m_commsManager.AddInventoryService(cmdparams[0]); | ||
611 | } | ||
612 | break; | ||
613 | 580 | ||
614 | case "predecode-j2k": | 581 | case "backup": |
615 | if (cmdparams.Length > 0) | 582 | m_sceneManager.BackupCurrentScene(); |
616 | { | 583 | break; |
617 | m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0])); | 584 | |
618 | } | 585 | case "remove-region": |
619 | else | 586 | string regRemoveName = CombineParams(cmdparams, 0); |
620 | { | 587 | |
621 | m_sceneManager.CacheJ2kDecode(1); | 588 | Scene removeScene; |
622 | } | 589 | if (m_sceneManager.TryGetScene(regRemoveName, out removeScene)) |
623 | break; | 590 | RemoveRegion(removeScene, false); |
591 | else | ||
592 | m_console.Error("no region with that name"); | ||
593 | break; | ||
594 | |||
595 | case "delete-region": | ||
596 | string regDeleteName = CombineParams(cmdparams, 0); | ||
597 | |||
598 | Scene killScene; | ||
599 | if (m_sceneManager.TryGetScene(regDeleteName, out killScene)) | ||
600 | RemoveRegion(killScene, true); | ||
601 | else | ||
602 | m_console.Error("no region with that name"); | ||
603 | break; | ||
604 | |||
605 | case "restart": | ||
606 | m_sceneManager.RestartCurrentScene(); | ||
607 | break; | ||
608 | |||
609 | case "Add-InventoryHost": | ||
610 | if (cmdparams.Length > 0) | ||
611 | { | ||
612 | m_commsManager.AddInventoryService(cmdparams[0]); | ||
613 | } | ||
614 | break; | ||
615 | |||
616 | case "predecode-j2k": | ||
617 | if (cmdparams.Length > 0) | ||
618 | { | ||
619 | m_sceneManager.CacheJ2kDecode(Convert.ToInt32(cmdparams[0])); | ||
620 | } | ||
621 | else | ||
622 | { | ||
623 | m_sceneManager.CacheJ2kDecode(1); | ||
624 | } | ||
625 | break; | ||
624 | } | 626 | } |
625 | } | 627 | } |
626 | 628 | ||
@@ -743,10 +745,10 @@ namespace OpenSim | |||
743 | } | 745 | } |
744 | 746 | ||
745 | // see BaseOpenSimServer | 747 | // see BaseOpenSimServer |
746 | override public void HandleShow(string mod, string[] cmd) | 748 | public override void HandleShow(string mod, string[] cmd) |
747 | { | 749 | { |
748 | base.HandleShow(mod, cmd); | 750 | base.HandleShow(mod, cmd); |
749 | 751 | ||
750 | List<string> args = new List<string>(cmd); | 752 | List<string> args = new List<string>(cmd); |
751 | args.RemoveAt(0); | 753 | args.RemoveAt(0); |
752 | string[] showParams = args.ToArray(); | 754 | string[] showParams = args.ToArray(); |
@@ -812,11 +814,12 @@ namespace OpenSim | |||
812 | case "regions": | 814 | case "regions": |
813 | m_sceneManager.ForEachScene( | 815 | m_sceneManager.ForEachScene( |
814 | delegate(Scene scene) | 816 | delegate(Scene scene) |
815 | { | 817 | { |
816 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + | 818 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + |
817 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + | 819 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + |
818 | scene.RegionInfo.RegionLocY + " , Region Port: " + scene.RegionInfo.InternalEndPoint.Port.ToString()); | 820 | scene.RegionInfo.RegionLocY + " , Region Port: " + |
819 | }); | 821 | scene.RegionInfo.InternalEndPoint.Port.ToString()); |
822 | }); | ||
820 | break; | 823 | break; |
821 | 824 | ||
822 | case "queues": | 825 | case "queues": |
@@ -842,16 +845,16 @@ namespace OpenSim | |||
842 | (IStatsCollector) client; | 845 | (IStatsCollector) client; |
843 | 846 | ||
844 | report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n", | 847 | report = report + string.Format("{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}\n", |
845 | "Send", | 848 | "Send", |
846 | "In", | 849 | "In", |
847 | "Out", | 850 | "Out", |
848 | "Resend", | 851 | "Resend", |
849 | "Land", | 852 | "Land", |
850 | "Wind", | 853 | "Wind", |
851 | "Cloud", | 854 | "Cloud", |
852 | "Task", | 855 | "Task", |
853 | "Texture", | 856 | "Texture", |
854 | "Asset"); | 857 | "Asset"); |
855 | report = report + stats.Report() + | 858 | report = report + stats.Report() + |
856 | "\n\n"; | 859 | "\n\n"; |
857 | } | 860 | } |
@@ -878,7 +881,7 @@ namespace OpenSim | |||
878 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); | 881 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); |
879 | else firstName = cmdparams[2]; | 882 | else firstName = cmdparams[2]; |
880 | 883 | ||
881 | if ( cmdparams.Length < 4 ) | 884 | if (cmdparams.Length < 4) |
882 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); | 885 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); |
883 | else lastName = cmdparams[3]; | 886 | else lastName = cmdparams[3]; |
884 | 887 | ||
@@ -886,11 +889,11 @@ namespace OpenSim | |||
886 | password = MainConsole.Instance.PasswdPrompt("Password"); | 889 | password = MainConsole.Instance.PasswdPrompt("Password"); |
887 | else password = cmdparams[4]; | 890 | else password = cmdparams[4]; |
888 | 891 | ||
889 | if ( cmdparams.Length < 6 ) | 892 | if (cmdparams.Length < 6) |
890 | regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); | 893 | regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); |
891 | else regX = Convert.ToUInt32(cmdparams[5]); | 894 | else regX = Convert.ToUInt32(cmdparams[5]); |
892 | 895 | ||
893 | if ( cmdparams.Length < 7 ) | 896 | if (cmdparams.Length < 7) |
894 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); | 897 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); |
895 | else regY = Convert.ToUInt32(cmdparams[6]); | 898 | else regY = Convert.ToUInt32(cmdparams[6]); |
896 | 899 | ||
@@ -922,11 +925,11 @@ namespace OpenSim | |||
922 | firstName = MainConsole.Instance.CmdPrompt("First name"); | 925 | firstName = MainConsole.Instance.CmdPrompt("First name"); |
923 | else firstName = cmdparams[3]; | 926 | else firstName = cmdparams[3]; |
924 | 927 | ||
925 | if ( cmdparams.Length < 5 ) | 928 | if (cmdparams.Length < 5) |
926 | lastName = MainConsole.Instance.CmdPrompt("Last name"); | 929 | lastName = MainConsole.Instance.CmdPrompt("Last name"); |
927 | else lastName = cmdparams[4]; | 930 | else lastName = cmdparams[4]; |
928 | 931 | ||
929 | if ( cmdparams.Length < 6 ) | 932 | if (cmdparams.Length < 6) |
930 | newPassword = MainConsole.Instance.PasswdPrompt("New password"); | 933 | newPassword = MainConsole.Instance.PasswdPrompt("New password"); |
931 | else newPassword = cmdparams[5]; | 934 | else newPassword = cmdparams[5]; |
932 | 935 | ||
@@ -1114,4 +1117,4 @@ namespace OpenSim | |||
1114 | 1117 | ||
1115 | #endregion | 1118 | #endregion |
1116 | } | 1119 | } |
1117 | } | 1120 | } \ No newline at end of file |