diff options
author | Jeff Ames | 2007-12-06 17:41:21 +0000 |
---|---|---|
committer | Jeff Ames | 2007-12-06 17:41:21 +0000 |
commit | a47176ee9287cc2802007e9cd1eb15e2a0b04906 (patch) | |
tree | a0ebc88b9a87e7d39e9a315599eb3fdc4c149a93 | |
parent | * now the throttle timer is stopped whilst processing Queue so that it won't ... (diff) | |
download | opensim-SC-a47176ee9287cc2802007e9cd1eb15e2a0b04906.zip opensim-SC-a47176ee9287cc2802007e9cd1eb15e2a0b04906.tar.gz opensim-SC-a47176ee9287cc2802007e9cd1eb15e2a0b04906.tar.bz2 opensim-SC-a47176ee9287cc2802007e9cd1eb15e2a0b04906.tar.xz |
more minor cleanup. added some command descriptions to region server help.
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/Program.cs | 8 |
3 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 9ad6c5f..d6dc3ea 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -443,10 +443,11 @@ namespace OpenSim | |||
443 | 443 | ||
444 | m_assetCache = new AssetCache(assetServer, m_log); | 444 | m_assetCache = new AssetCache(assetServer, m_log); |
445 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); | 445 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); |
446 | m_sceneManager.OnReStartSim += handleReStartRegion; | 446 | m_sceneManager.OnRestartSim += handleRestartRegion; |
447 | 447 | ||
448 | } | 448 | } |
449 | public void handleReStartRegion(RegionInfo whichRegion) | 449 | |
450 | public void handleRestartRegion(RegionInfo whichRegion) | ||
450 | { | 451 | { |
451 | MainLog.Instance.Error("MAIN", "Got Restart Singlal from SceneManager"); | 452 | MainLog.Instance.Error("MAIN", "Got Restart Singlal from SceneManager"); |
452 | // Shutting down the UDP server | 453 | // Shutting down the UDP server |
@@ -455,7 +456,6 @@ namespace OpenSim | |||
455 | 456 | ||
456 | for (int i = 0; i < m_udpServers.Count; i++) | 457 | for (int i = 0; i < m_udpServers.Count; i++) |
457 | { | 458 | { |
458 | |||
459 | if (m_udpServers[i].RegionHandle == whichRegion.RegionHandle) | 459 | if (m_udpServers[i].RegionHandle == whichRegion.RegionHandle) |
460 | { | 460 | { |
461 | UDPServerElement = i; | 461 | UDPServerElement = i; |
@@ -486,7 +486,6 @@ namespace OpenSim | |||
486 | UDPServer restartingRegion = CreateRegion(whichRegion); | 486 | UDPServer restartingRegion = CreateRegion(whichRegion); |
487 | restartingRegion.ServerListener(); | 487 | restartingRegion.ServerListener(); |
488 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); | 488 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); |
489 | |||
490 | } | 489 | } |
491 | 490 | ||
492 | protected override LogBase CreateLog() | 491 | protected override LogBase CreateLog() |
@@ -536,7 +535,6 @@ namespace OpenSim | |||
536 | /// </summary> | 535 | /// </summary> |
537 | public virtual void Shutdown() | 536 | public virtual void Shutdown() |
538 | { | 537 | { |
539 | |||
540 | if (m_startupCommandsFile != "") | 538 | if (m_startupCommandsFile != "") |
541 | { | 539 | { |
542 | RunCommandScript(m_shutdownCommandsFile); | 540 | RunCommandScript(m_shutdownCommandsFile); |
@@ -609,7 +607,6 @@ namespace OpenSim | |||
609 | m_sceneManager.ForceCurrentSceneClientUpdate(); | 607 | m_sceneManager.ForceCurrentSceneClientUpdate(); |
610 | break; | 608 | break; |
611 | 609 | ||
612 | |||
613 | case "edit-scale": | 610 | case "edit-scale": |
614 | if (cmdparams.Length == 4) | 611 | if (cmdparams.Length == 4) |
615 | { | 612 | { |
@@ -629,21 +626,27 @@ namespace OpenSim | |||
629 | m_log.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); | 626 | m_log.Error(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); |
630 | m_log.Error(" alert general [Message] - send an alert to all users."); | 627 | m_log.Error(" alert general [Message] - send an alert to all users."); |
631 | m_log.Error("backup - trigger a simulator backup"); | 628 | m_log.Error("backup - trigger a simulator backup"); |
629 | m_log.Error("change-region - sets the region that many of these commands affect."); | ||
632 | m_log.Error("command-script [filename] - Execute command in a file."); | 630 | m_log.Error("command-script [filename] - Execute command in a file."); |
633 | m_log.Error("debug - debugging commands"); | 631 | m_log.Error("debug - debugging commands"); |
634 | m_log.Error(" packet 0..255 - print incoming/outgoing packets (0=off)"); | 632 | m_log.Error(" packet 0..255 - print incoming/outgoing packets (0=off)"); |
633 | m_log.Error("edit-scale [prim name] [x] [y] [z] - resize given prim"); | ||
634 | m_log.Error("export-map [filename] - save image of world map"); | ||
635 | m_log.Error("force-update - force an update of prims in the scene"); | 635 | m_log.Error("force-update - force an update of prims in the scene"); |
636 | m_log.Error("load-xml [filename] - load prims from XML"); | 636 | m_log.Error("load-xml [filename] - load prims from XML"); |
637 | m_log.Error("load-xml2 [filename] - load prims from XML using version 2 format"); | ||
638 | m_log.Error("permissions [true/false] - turn on/off permissions on the scene"); | ||
639 | m_log.Error("quit - equivalent to shutdown."); | ||
640 | m_log.Error("restart - disconnects all clients and restarts the sims in the instance."); | ||
637 | m_log.Error("save-xml [filename] - save prims to XML"); | 641 | m_log.Error("save-xml [filename] - save prims to XML"); |
642 | m_log.Error("save-xml2 [filename] - save prims to XML using version 2 format"); | ||
638 | m_log.Error("script - manually trigger scripts? or script commands?"); | 643 | m_log.Error("script - manually trigger scripts? or script commands?"); |
644 | m_log.Error("set-time [x] - set the current scene time phase"); | ||
639 | m_log.Error("show uptime - show simulator startup and uptime."); | 645 | m_log.Error("show uptime - show simulator startup and uptime."); |
640 | m_log.Error("show users - show info about connected users."); | 646 | m_log.Error("show users - show info about connected users."); |
641 | m_log.Error("show modules - shows info aboutloaded modules."); | 647 | m_log.Error("show modules - shows info aboutloaded modules."); |
642 | m_log.Error("change-region - sets the region that many of these commands affect."); | ||
643 | m_log.Error("restart - disconnects all clients and restarts the sims in the instance."); | ||
644 | m_log.Error("shutdown - disconnect all clients and shutdown."); | 648 | m_log.Error("shutdown - disconnect all clients and shutdown."); |
645 | m_log.Error("terrain help - show help for terrain commands."); | 649 | m_log.Error("terrain help - show help for terrain commands."); |
646 | m_log.Error("quit - equivalent to shutdown."); | ||
647 | break; | 650 | break; |
648 | 651 | ||
649 | case "show": | 652 | case "show": |
@@ -734,9 +737,7 @@ namespace OpenSim | |||
734 | case "permissions": | 737 | case "permissions": |
735 | // Treats each user as a super-admin when disabled | 738 | // Treats each user as a super-admin when disabled |
736 | bool permissions = Convert.ToBoolean(cmdparams[0]); | 739 | bool permissions = Convert.ToBoolean(cmdparams[0]); |
737 | |||
738 | m_sceneManager.SetBypassPermissionsOnCurrentScene(!permissions); | 740 | m_sceneManager.SetBypassPermissionsOnCurrentScene(!permissions); |
739 | |||
740 | break; | 741 | break; |
741 | 742 | ||
742 | case "backup": | 743 | case "backup": |
@@ -778,6 +779,7 @@ namespace OpenSim | |||
778 | case "shutdown": | 779 | case "shutdown": |
779 | Shutdown(); | 780 | Shutdown(); |
780 | break; | 781 | break; |
782 | |||
781 | case "restart": | 783 | case "restart": |
782 | m_sceneManager.RestartCurrentScene(); | 784 | m_sceneManager.RestartCurrentScene(); |
783 | break; | 785 | break; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 3f88617..c589e8d 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -34,11 +34,11 @@ using OpenSim.Framework.Console; | |||
34 | 34 | ||
35 | namespace OpenSim.Region.Environment.Scenes | 35 | namespace OpenSim.Region.Environment.Scenes |
36 | { | 36 | { |
37 | public delegate void ReStartSim(RegionInfo thisregion); | 37 | public delegate void RestartSim(RegionInfo thisregion); |
38 | 38 | ||
39 | public class SceneManager | 39 | public class SceneManager |
40 | { | 40 | { |
41 | public event ReStartSim OnReStartSim; | 41 | public event RestartSim OnRestartSim; |
42 | 42 | ||
43 | private readonly List<Scene> m_localScenes; | 43 | private readonly List<Scene> m_localScenes; |
44 | private Scene m_currentScene = null; | 44 | private Scene m_currentScene = null; |
@@ -103,7 +103,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
103 | int RegionSceneElement = -1; | 103 | int RegionSceneElement = -1; |
104 | for (int i = 0; i < m_localScenes.Count; i++) | 104 | for (int i = 0; i < m_localScenes.Count; i++) |
105 | { | 105 | { |
106 | |||
107 | if (rdata.RegionName == m_localScenes[i].RegionInfo.RegionName) | 106 | if (rdata.RegionName == m_localScenes[i].RegionInfo.RegionName) |
108 | { | 107 | { |
109 | RegionSceneElement = i; | 108 | RegionSceneElement = i; |
@@ -111,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
111 | } | 110 | } |
112 | 111 | ||
113 | // Now we make sure the region is no longer known about by the SceneManager | 112 | // Now we make sure the region is no longer known about by the SceneManager |
114 | // Prevents Duplicates. | 113 | // Prevents duplicates. |
115 | 114 | ||
116 | if (RegionSceneElement >= 0) | 115 | if (RegionSceneElement >= 0) |
117 | { | 116 | { |
@@ -119,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
119 | } | 118 | } |
120 | 119 | ||
121 | // Send signal to main that we're restarting this sim. | 120 | // Send signal to main that we're restarting this sim. |
122 | OnReStartSim(rdata); | 121 | OnRestartSim(rdata); |
123 | } | 122 | } |
124 | 123 | ||
125 | public void SendSimOnlineNotification(ulong regionHandle) | 124 | public void SendSimOnlineNotification(ulong regionHandle) |
@@ -131,7 +130,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | 130 | ||
132 | if (m_localScenes[i].RegionInfo.RegionHandle == regionHandle) | 131 | if (m_localScenes[i].RegionInfo.RegionHandle == regionHandle) |
133 | { | 132 | { |
134 | |||
135 | // Inform other regions to tell their avatar about me | 133 | // Inform other regions to tell their avatar about me |
136 | Result = m_localScenes[i].RegionInfo; | 134 | Result = m_localScenes[i].RegionInfo; |
137 | } | 135 | } |
@@ -140,10 +138,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
140 | { | 138 | { |
141 | for (int i = 0; i < m_localScenes.Count; i++) | 139 | for (int i = 0; i < m_localScenes.Count; i++) |
142 | { | 140 | { |
143 | |||
144 | if (m_localScenes[i].RegionInfo.RegionHandle != regionHandle) | 141 | if (m_localScenes[i].RegionInfo.RegionHandle != regionHandle) |
145 | { | 142 | { |
146 | |||
147 | // Inform other regions to tell their avatar about me | 143 | // Inform other regions to tell their avatar about me |
148 | //m_localScenes[i].OtherRegionUp(Result); | 144 | //m_localScenes[i].OtherRegionUp(Result); |
149 | } | 145 | } |
@@ -221,7 +217,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
221 | public void RestartCurrentScene() | 217 | public void RestartCurrentScene() |
222 | { | 218 | { |
223 | ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); }); | 219 | ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); }); |
224 | |||
225 | } | 220 | } |
226 | 221 | ||
227 | public void BackupCurrentScene() | 222 | public void BackupCurrentScene() |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 16dcd7b..a86946e 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -48,6 +48,9 @@ namespace SimpleApp | |||
48 | private ModuleLoader m_moduleLoader; | 48 | private ModuleLoader m_moduleLoader; |
49 | private IConfigSource m_config; | 49 | private IConfigSource m_config; |
50 | 50 | ||
51 | private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll"; | ||
52 | private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; | ||
53 | |||
51 | protected override LogBase CreateLog() | 54 | protected override LogBase CreateLog() |
52 | { | 55 | { |
53 | return new LogBase(null, "SimpleApp", this, true); | 56 | return new LogBase(null, "SimpleApp", this, true); |
@@ -70,11 +73,14 @@ namespace SimpleApp | |||
70 | StartUp(); | 73 | StartUp(); |
71 | 74 | ||
72 | LocalInventoryService inventoryService = new LocalInventoryService(); | 75 | LocalInventoryService inventoryService = new LocalInventoryService(); |
76 | inventoryService.AddPlugin(m_inventoryPlugin); | ||
77 | |||
73 | LocalUserServices userService = | 78 | LocalUserServices userService = |
74 | new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, | 79 | new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, |
75 | m_networkServersInfo.DefaultHomeLocY, inventoryService); | 80 | m_networkServersInfo.DefaultHomeLocY, inventoryService); |
81 | userService.AddPlugin(m_userPlugin); | ||
82 | |||
76 | LocalBackEndServices backendService = new LocalBackEndServices(); | 83 | LocalBackEndServices backendService = new LocalBackEndServices(); |
77 | userService.AddPlugin("OpenSim.Framework.Data.SQLite.dll"); | ||
78 | 84 | ||
79 | CommunicationsLocal localComms = | 85 | CommunicationsLocal localComms = |
80 | new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, | 86 | new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, inventoryService, |