diff options
author | MW | 2007-09-04 16:48:06 +0000 |
---|---|---|
committer | MW | 2007-09-04 16:48:06 +0000 |
commit | d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015 (patch) | |
tree | 9bd50480fb6723ade4b1efe852659c512ec54cae /OpenSim/Region/Application | |
parent | Fixed it so change-region works with region names that have spaces in them. (diff) | |
download | opensim-SC-d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015.zip opensim-SC-d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015.tar.gz opensim-SC-d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015.tar.bz2 opensim-SC-d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015.tar.xz |
Using change-region without a region name will now display the currently active region's name.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index bf37bb6..f84e8fc 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -371,7 +371,7 @@ namespace OpenSim | |||
371 | /// <param name="cmdparams">Additional arguments passed to the command</param> | 371 | /// <param name="cmdparams">Additional arguments passed to the command</param> |
372 | public void RunCmd(string command, string[] cmdparams) | 372 | public void RunCmd(string command, string[] cmdparams) |
373 | { | 373 | { |
374 | if ((m_consoleRegion == null) || (command == "exit-region")) | 374 | if ((m_consoleRegion == null) || (command == "exit-region") || (command == "change-region")) |
375 | { | 375 | { |
376 | switch (command) | 376 | switch (command) |
377 | { | 377 | { |
@@ -500,16 +500,27 @@ namespace OpenSim | |||
500 | if (cmdparams.Length > 0) | 500 | if (cmdparams.Length > 0) |
501 | { | 501 | { |
502 | string name = this.CombineParams(cmdparams, 0); | 502 | string name = this.CombineParams(cmdparams, 0); |
503 | Console.WriteLine("Searching for Region: '" + name +"'"); | 503 | Console.WriteLine("Searching for Region: '" + name + "'"); |
504 | foreach (Scene scene in m_localScenes) | 504 | foreach (Scene scene in m_localScenes) |
505 | { | 505 | { |
506 | if (scene.RegionInfo.RegionName.ToLower() == name.ToLower()) | 506 | if (scene.RegionInfo.RegionName.ToLower() == name.ToLower()) |
507 | { | 507 | { |
508 | m_consoleRegion = scene; | 508 | m_consoleRegion = scene; |
509 | MainLog.Instance.Verbose("Current Region set as: " + m_consoleRegion.RegionInfo.RegionName); | 509 | MainLog.Instance.Verbose("Setting current region: " + m_consoleRegion.RegionInfo.RegionName); |
510 | } | 510 | } |
511 | } | 511 | } |
512 | } | 512 | } |
513 | else | ||
514 | { | ||
515 | if (m_consoleRegion != null) | ||
516 | { | ||
517 | MainLog.Instance.Verbose("Current Region: " + m_consoleRegion.RegionInfo.RegionName + ". To change region please use 'change-region <regioname>'"); | ||
518 | } | ||
519 | else | ||
520 | { | ||
521 | MainLog.Instance.Verbose("Currently at Root level. To change region please use 'change-region <regioname>'"); | ||
522 | } | ||
523 | } | ||
513 | break; | 524 | break; |
514 | 525 | ||
515 | case "exit-region": | 526 | case "exit-region": |