Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

user_profiles
Diva Canto 2013-03-02 17:54:19 -08:00
commit e70c71a175
5 changed files with 68 additions and 9 deletions

View File

@ -85,16 +85,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
if (modulesConfig == null)
modulesConfig = m_openSim.ConfigSource.Source.AddConfig("Modules");
Dictionary<RuntimeAddin, IList<int>> loadedModules = new Dictionary<RuntimeAddin, IList<int>>();
// Scan modules and load all that aren't disabled
foreach (TypeExtensionNode node in
AddinManager.GetExtensionNodes("/OpenSim/RegionModules"))
{
IList<int> loadedModuleData;
if (!loadedModules.ContainsKey(node.Addin))
loadedModules.Add(node.Addin, new List<int> { 0, 0, 0 });
loadedModuleData = loadedModules[node.Addin];
if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null)
{
if (CheckModuleEnabled(node, modulesConfig))
{
m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type);
m_sharedModules.Add(node);
loadedModuleData[0]++;
}
}
else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null)
@ -103,14 +113,26 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController
{
m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type);
m_nonSharedModules.Add(node);
loadedModuleData[1]++;
}
}
else
{
m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type);
m_log.WarnFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type);
loadedModuleData[2]++;
}
}
foreach (KeyValuePair<RuntimeAddin, IList<int>> loadedModuleData in loadedModules)
{
m_log.InfoFormat(
"[REGIONMODULES]: From plugin {0}, (version {1}), loaded {2} modules, {3} shared, {4} non-shared {5} unknown",
loadedModuleData.Key.Id,
loadedModuleData.Key.Version,
loadedModuleData.Value[0] + loadedModuleData.Value[1] + loadedModuleData.Value[2],
loadedModuleData.Value[0], loadedModuleData.Value[1], loadedModuleData.Value[2]);
}
// Load and init the module. We try a constructor with a port
// if a port was given, fall back to one without if there is
// no port or the more specific constructor fails.

View File

@ -932,7 +932,12 @@ namespace OpenSim.Region.Framework.Scenes
}
}
string grant = startupConfig.GetString("AllowedClients", String.Empty);
string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "Startup" };
string grant
= Util.GetConfigVarFromSections<string>(
config, "AllowedClients", possibleAccessControlConfigSections, "");
if (grant.Length > 0)
{
foreach (string viewer in grant.Split('|'))
@ -941,7 +946,10 @@ namespace OpenSim.Region.Framework.Scenes
}
}
grant = startupConfig.GetString("BannedClients", String.Empty);
grant
= Util.GetConfigVarFromSections<string>(
config, "BannedClients", possibleAccessControlConfigSections, "");
if (grant.Length > 0)
{
foreach (string viewer in grant.Split('|'))

View File

@ -45,6 +45,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
public class WebSocketEchoModule : ISharedRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool enabled;
public string Name { get { return "WebSocketEchoModule"; } }
@ -56,8 +57,8 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
public void Initialise(IConfigSource pConfig)
{
enabled = (pConfig.Configs["WebSocketEcho"] != null);
if (enabled)
m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE");
// if (enabled)
// m_log.DebugFormat("[WebSocketEchoModule]: INITIALIZED MODULE");
}
/// <summary>
@ -158,17 +159,17 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule
public void AddRegion(Scene scene)
{
m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName);
// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} ADDED", scene.RegionInfo.RegionName);
}
public void RemoveRegion(Scene scene)
{
m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
}
public void RegionLoaded(Scene scene)
{
m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName);
// m_log.DebugFormat("[WebSocketEchoModule]: REGION {0} LOADED", scene.RegionInfo.RegionName);
}
}
}

View File

@ -256,6 +256,29 @@
;; default is false
; TelehubAllowLandmark = false
[AccessControl]
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
;; Bar (|) separated list of viewers which may gain access to the regions.
;; One can use a substring of the viewer name to enable only certain
;; versions
;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
;; - "Imprudence" has access
;; - "Imprudence 1.3" has access
;; - "Imprudence 1.3.1" has no access
; AllowedClients =
;# {BannedClients} {} {Bar (|) separated list of banned clients} {}
;# Bar (|) separated list of viewers which may not gain access to the regions.
;; One can use a Substring of the viewer name to disable only certain
;; versions
;; Example: Agent uses the viewer "Imprudence 1.3.2.0"
;; - "Imprudence" has no access
;; - "Imprudence 1.3" has no access
;; - "Imprudence 1.3.1" has access
; BannedClients =
[Map]
;# {GenerateMaptiles} {} {Generate map tiles?} {true false} true
;; Map tile options.
@ -290,6 +313,7 @@
;; got a large number of objects, so you can turn it off here if you'd like.
; DrawPrimOnMapTile = true
[Permissions]
;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule
;; Permission modules to use, separated by comma.

View File

@ -1400,6 +1400,10 @@
; up the system to malicious scripters
; NotecardLineReadCharsMax = 255
; Minimum settable timer interval. Any timer setting less than this is
; rounded up to this minimum interval.
; MinTimerInterval = 0.5
; Sensor settings
SensorMaxRange = 96.0
SensorMaxResults = 16