Incremental patch to add config options to enable/disable the prim limits module to OpenSim.ini. EnforcePrimLimits is set to false by default to emulate the current behavior.
parent
d3c3feb6b1
commit
939026d874
|
@ -56,6 +56,7 @@ namespace OpenSim.Region.OptionalModules
|
||||||
{
|
{
|
||||||
protected IDialogModule m_dialogModule;
|
protected IDialogModule m_dialogModule;
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
private bool m_enabled;
|
||||||
|
|
||||||
public string Name { get { return "Prim Limits Module"; } }
|
public string Name { get { return "Prim Limits Module"; } }
|
||||||
|
|
||||||
|
@ -63,6 +64,15 @@ namespace OpenSim.Region.OptionalModules
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
|
IConfig moduleConfig = source.Configs["PrimLimitsModule"];
|
||||||
|
if (moduleConfig != null)
|
||||||
|
{
|
||||||
|
this.m_enabled = moduleConfig.GetBoolean("EnforcePrimLimits", false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.m_enabled = false;
|
||||||
|
}
|
||||||
m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE");
|
m_log.DebugFormat("[PRIM LIMITS]: INITIALIZED MODULE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +83,10 @@ namespace OpenSim.Region.OptionalModules
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
if(!m_enabled)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
scene.Permissions.OnRezObject += CanRezObject;
|
scene.Permissions.OnRezObject += CanRezObject;
|
||||||
scene.Permissions.OnObjectEntry += CanObjectEnter;
|
scene.Permissions.OnObjectEntry += CanObjectEnter;
|
||||||
scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||||
|
@ -81,6 +95,10 @@ namespace OpenSim.Region.OptionalModules
|
||||||
|
|
||||||
public void RemoveRegion(Scene scene)
|
public void RemoveRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
if(m_enabled)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
scene.Permissions.OnRezObject -= CanRezObject;
|
scene.Permissions.OnRezObject -= CanRezObject;
|
||||||
scene.Permissions.OnObjectEntry -= CanObjectEnter;
|
scene.Permissions.OnObjectEntry -= CanObjectEnter;
|
||||||
scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
|
scene.Permissions.OnDuplicateObject -= CanDuplicateObject;
|
||||||
|
|
|
@ -736,6 +736,10 @@
|
||||||
;; Enable media on a prim facilities
|
;; Enable media on a prim facilities
|
||||||
; Enabled = true;
|
; Enabled = true;
|
||||||
|
|
||||||
|
[PrimLimitsModule]
|
||||||
|
;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false
|
||||||
|
;; Enable parcel prim limits. Off by default to emulate pre-existing behavior.
|
||||||
|
; EnforcePrimLimits = false
|
||||||
|
|
||||||
[Architecture]
|
[Architecture]
|
||||||
;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini
|
;# {Include-Architecture} {} {Choose one of the following architectures} {config-include/Standalone.ini config-include/StandaloneHypergrid.ini config-include/Grid.ini config-include/GridHypergrid.ini config-include/SimianGrid.ini config-include/HyperSimianGrid.ini} config-include/Standalone.ini
|
||||||
|
|
Loading…
Reference in New Issue