From 797def8aa4a009ba3bc44d6b73e063e4bb61ba97 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Aug 2011 04:33:45 +0100 Subject: Put config to enable disable [NPC] module. Default is disabled. You will need to explicitly enable to toy with this. --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 11 +++++++---- bin/OpenSim.ini.example | 6 ++++++ bin/OpenSimDefaults.ini | 4 ++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index fcfacc6..d139b25 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -44,15 +44,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - // private const bool m_enabled = false; - private Dictionary m_avatars = new Dictionary(); private Dictionary m_appearanceCache = new Dictionary(); public void Initialise(Scene scene, IConfigSource source) { - scene.RegisterModuleInterface(this); - scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; + IConfig config = source.Configs["NPC"]; + + if (config != null && config.GetBoolean("Enabled", false)) + { + scene.RegisterModuleInterface(this); + scene.EventManager.OnSignificantClientMovement += HandleOnSignificantClientMovement; + } } public void HandleOnSignificantClientMovement(ScenePresence presence) diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 5da80c0..1a87b79 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -716,6 +716,12 @@ ; Enabled = true; +[NPC] + ;# {Enabled} {} {Enable Non Player Character (NPC) facilities} {true false} false + ;; Enable media on a prim facilities + ; Enabled = false + + [PrimLimitsModule] ;# {EnforcePrimLimits} {} {Enforce parcel prim limits} {true false} false ;; Enable parcel prim limits. Off by default to emulate pre-existing behavior. diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 59088c4..d74f373 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1366,6 +1366,10 @@ ; Enable media on a prim facilities Enabled = true; +[NPC] + ;; Enable media on a prim facilities + Enabled = false + ;; ;; If you are using a simian grid frontend you can enable ;; this module to upload tile images for the mapping fn -- cgit v1.1