diff options
author | Diva Canto | 2013-03-02 17:54:19 -0800 |
---|---|---|
committer | Diva Canto | 2013-03-02 17:54:19 -0800 |
commit | e70c71a1758ed450444a6272f9afe4528ccf3abc (patch) | |
tree | 5dcdc7e8a3f94b7f6d83ae7fa5d8b6a2d05be668 | |
parent | Fixed typos in TempAttachmentsModule. No changes. (diff) | |
parent | Added existance and default value for [XEngine]MinTimerInterval to OpenSimDef... (diff) | |
download | opensim-SC_OLD-e70c71a1758ed450444a6272f9afe4528ccf3abc.zip opensim-SC_OLD-e70c71a1758ed450444a6272f9afe4528ccf3abc.tar.gz opensim-SC_OLD-e70c71a1758ed450444a6272f9afe4528ccf3abc.tar.bz2 opensim-SC_OLD-e70c71a1758ed450444a6272f9afe4528ccf3abc.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r-- | OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs | 13 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 24 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 4 |
5 files changed, 68 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 633d005..510be37 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs | |||
@@ -85,16 +85,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
85 | if (modulesConfig == null) | 85 | if (modulesConfig == null) |
86 | modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules"); | 86 | modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules"); |
87 | 87 | ||
88 | Dictionary<RuntimeAddin, IList<int>> loadedModules = new Dictionary<RuntimeAddin, IList<int>>(); | ||
89 | |||
88 | // Scan modules and load all that aren't disabled | 90 | // Scan modules and load all that aren't disabled |
89 | foreach (TypeExtensionNode node in | 91 | foreach (TypeExtensionNode node in |
90 | AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) | 92 | AddinManager.GetExtensionNodes("/OpenSim/RegionModules")) |
91 | { | 93 | { |
94 | IList<int> loadedModuleData; | ||
95 | |||
96 | if (!loadedModules.ContainsKey(node.Addin)) | ||
97 | loadedModules.Add(node.Addin, new List<int> { 0, 0, 0 }); | ||
98 | |||
99 | loadedModuleData = loadedModules[node.Addin]; | ||
100 | |||
92 | if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) | 101 | if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) |
93 | { | 102 | { |
94 | if (CheckModuleEnabled(node, modulesConfig)) | 103 | if (CheckModuleEnabled(node, modulesConfig)) |
95 | { | 104 | { |
96 | m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); | 105 | m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); |
97 | m_sharedModules.Add(node); | 106 | m_sharedModules.Add(node); |
107 | loadedModuleData[0]++; | ||
98 | } | 108 | } |
99 | } | 109 | } |
100 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) | 110 | else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) |
@@ -103,14 +113,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController | |||
103 | { | 113 | { |
104 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); | 114 | m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); |
105 | m_nonSharedModules.Add(node); | 115 | m_nonSharedModules.Add(node); |
116 | loadedModuleData[1]++; | ||
106 | } | 117 | } |
107 | } | 118 | } |
108 | else | 119 | else |
109 | { | 120 | { |
110 | m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); | 121 | m_log.WarnFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); |
122 | loadedModuleData[2]++; | ||
111 | } | 123 | } |
112 | } | 124 | } |
113 | 125 | ||
126 | foreach (KeyValuePair<RuntimeAddin, IList<int>> loadedModuleData in loadedModules) | ||
127 | { | ||
128 | m_log.InfoFormat( | ||
129 | "[REGIONMODULES]: From plugin {0}, (version {1}), loaded {2} modules, {3} shared, {4} non-shared {5} unknown", | ||
130 | loadedModuleData.Key.Id, | ||
131 | loadedModuleData.Key.Version, | ||
132 | loadedModuleData.Value[0] + loadedModuleData.Value[1] + loadedModuleData.Value[2], | ||
133 | loadedModuleData.Value[0], loadedModuleData.Value[1], loadedModuleData.Value[2]); | ||
134 | } | ||
135 | |||
114 | // Load and init the module. We try a constructor with a port | 136 | // Load and init the module. We try a constructor with a port |
115 | // if a port was given, fall back to one without if there is | 137 | // if a port was given, fall back to one without if there is |
116 | // no port or the more specific constructor fails. | 138 | // no port or the more specific constructor fails. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5b61538..14dac7a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -932,7 +932,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
932 | } | 932 | } |
933 | } | 933 | } |
934 | 934 | ||
935 | string grant = startupConfig.GetString("AllowedClients", String.Empty); | 935 | string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" }; |
936 | |||
937 | string grant | ||
938 | = Util.GetConfigVarFromSections<string>( | ||
939 | config, "AllowedClients", possibleAccessControlConfigSections, ""); | ||
940 | |||
936 | if (grant.Length > 0) | 941 | if (grant.Length > 0) |
937 | { | 942 | { |
938 | foreach (string viewer in grant.Split('|')) | 943 | foreach (string viewer in grant.Split('|')) |
@@ -941,7 +946,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
941 | } | 946 | } |
942 | } | 947 | } |
943 | 948 | ||
944 | grant = startupConfig.GetString("BannedClients", String.Empty); | 949 | grant |
950 | = Util.GetConfigVarFromSections<string>( | ||
951 | config, "BannedClients", possibleAccessControlConfigSections, ""); | ||
952 | |||
945 | if (grant.Length > 0) | 953 | if (grant.Length > 0) |
946 | { | 954 | { |
947 | foreach (string viewer in grant.Split('|')) | 955 | foreach (string viewer in grant.Split('|')) |
diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs index 112ba4e..5bf0ed4 100644 --- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs +++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs | |||
@@ -45,6 +45,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | |||
45 | public class WebSocketEchoModule : ISharedRegionModule | 45 | public class WebSocketEchoModule : ISharedRegionModule |
46 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | |||
48 | private bool enabled; | 49 | private bool enabled; |
49 | public string Name { get { return "WebSocketEchoModule"; } } | 50 | public string Name { get { return "WebSocketEchoModule"; } } |
50 | 51 | ||
@@ -55,9 +56,9 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | |||
55 | 56 | ||
56 | public void Initialise(IConfigSource pConfig) | 57 | public void Initialise(IConfigSource pConfig) |
57 | { | 58 | { |
58 | enabled =(pConfig.Configs["WebSocketEcho"] != null); | 59 | enabled = (pConfig.Configs["WebSocketEcho"] != null); |
59 | if (enabled) | 60 | // if (enabled) |
60 | m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE"); | 61 | // m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE"); |
61 | } | 62 | } |
62 | 63 | ||
63 | /// <summary> | 64 | /// <summary> |
@@ -158,17 +159,17 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule | |||
158 | 159 | ||
159 | public void AddRegion(Scene scene) | 160 | public void AddRegion(Scene scene) |
160 | { | 161 | { |
161 | m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 162 | // m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
162 | } | 163 | } |
163 | 164 | ||
164 | public void RemoveRegion(Scene scene) | 165 | public void RemoveRegion(Scene scene) |
165 | { | 166 | { |
166 | m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName); | 167 | // m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName); |
167 | } | 168 | } |
168 | 169 | ||
169 | public void RegionLoaded(Scene scene) | 170 | public void RegionLoaded(Scene scene) |
170 | { | 171 | { |
171 | m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName); | 172 | // m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName); |
172 | } | 173 | } |
173 | } | 174 | } |
174 | } \ No newline at end of file | 175 | } \ No newline at end of file |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0eb43a2..eab1fce 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -256,6 +256,29 @@ | |||
256 | ;; default is false | 256 | ;; default is false |
257 | ; TelehubAllowLandmark = false | 257 | ; TelehubAllowLandmark = false |
258 | 258 | ||
259 | |||
260 | [AccessControl] | ||
261 | ;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {} | ||
262 | ;; Bar (|) separated list of viewers which may gain access to the regions. | ||
263 | ;; One can use a substring of the viewer name to enable only certain | ||
264 | ;; versions | ||
265 | ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" | ||
266 | ;; - "Imprudence" has access | ||
267 | ;; - "Imprudence 1.3" has access | ||
268 | ;; - "Imprudence 1.3.1" has no access | ||
269 | ; AllowedClients = | ||
270 | |||
271 | ;# {BannedClients} {} {Bar (|) separated list of banned clients} {} | ||
272 | ;# Bar (|) separated list of viewers which may not gain access to the regions. | ||
273 | ;; One can use a Substring of the viewer name to disable only certain | ||
274 | ;; versions | ||
275 | ;; Example: Agent uses the viewer "Imprudence 1.3.2.0" | ||
276 | ;; - "Imprudence" has no access | ||
277 | ;; - "Imprudence 1.3" has no access | ||
278 | ;; - "Imprudence 1.3.1" has access | ||
279 | ; BannedClients = | ||
280 | |||
281 | |||
259 | [Map] | 282 | [Map] |
260 | ;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true | 283 | ;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true |
261 | ;; Map tile options. | 284 | ;; Map tile options. |
@@ -290,6 +313,7 @@ | |||
290 | ;; got a large number of objects, so you can turn it off here if you'd like. | 313 | ;; got a large number of objects, so you can turn it off here if you'd like. |
291 | ; DrawPrimOnMapTile = true | 314 | ; DrawPrimOnMapTile = true |
292 | 315 | ||
316 | |||
293 | [Permissions] | 317 | [Permissions] |
294 | ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule | 318 | ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule |
295 | ;; Permission modules to use, separated by comma. | 319 | ;; Permission modules to use, separated by comma. |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 091107f..417150a 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -1400,6 +1400,10 @@ | |||
1400 | ; up the system to malicious scripters | 1400 | ; up the system to malicious scripters |
1401 | ; NotecardLineReadCharsMax = 255 | 1401 | ; NotecardLineReadCharsMax = 255 |
1402 | 1402 | ||
1403 | ; Minimum settable timer interval. Any timer setting less than this is | ||
1404 | ; rounded up to this minimum interval. | ||
1405 | ; MinTimerInterval = 0.5 | ||
1406 | |||
1403 | ; Sensor settings | 1407 | ; Sensor settings |
1404 | SensorMaxRange = 96.0 | 1408 | SensorMaxRange = 96.0 |
1405 | SensorMaxResults = 16 | 1409 | SensorMaxResults = 16 |