Don't fail to enable permissions modules correctly if there is any leading or trailing whitespace between comma separate module combinations.
parent
ccf18fd2ef
commit
e12c044eab
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -160,7 +161,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
||||||
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
||||||
|
|
||||||
List<string> modules = new List<string>(permissionModules.Split(','));
|
List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim()));
|
||||||
|
|
||||||
if (!modules.Contains("DefaultPermissionsModule"))
|
if (!modules.Contains("DefaultPermissionsModule"))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using Mono.Addins;
|
using Mono.Addins;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
@ -62,7 +63,7 @@ namespace OpenSim.Region.OptionalModules
|
||||||
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
||||||
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
||||||
|
|
||||||
List<string> modules=new List<string>(permissionModules.Split(','));
|
List<string> modules = new List<string>(permissionModules.Split(',').Select(m => m.Trim()));
|
||||||
|
|
||||||
if(!modules.Contains("PrimLimitsModule"))
|
if(!modules.Contains("PrimLimitsModule"))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue