aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/ModuleLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/ModuleLoader.cs')
-rw-r--r--OpenSim/Region/Environment/ModuleLoader.cs33
1 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs
index be3384b..ea416cb 100644
--- a/OpenSim/Region/Environment/ModuleLoader.cs
+++ b/OpenSim/Region/Environment/ModuleLoader.cs
@@ -28,27 +28,23 @@ namespace OpenSim.Region.Environment
28 /// <param name="scene"></param> 28 /// <param name="scene"></param>
29 public void CreateDefaultModules(Scene scene, string exceptModules) 29 public void CreateDefaultModules(Scene scene, string exceptModules)
30 { 30 {
31 XferModule xferManager = new XferModule(); 31 IRegionModule module = new XferModule();
32 xferManager.Initialise(scene); 32 InitialiseModule(module, scene);
33 scene.AddModule(xferManager.GetName(), xferManager);
34 LoadedModules.Add(xferManager);
35 33
36 ChatModule chatModule = new ChatModule(); 34 module = new ChatModule();
37 chatModule.Initialise(scene); 35 InitialiseModule(module, scene);
38 scene.AddModule(chatModule.GetName(), chatModule); 36
39 LoadedModules.Add(chatModule); 37 module = new AvatarProfilesModule();
40 38 InitialiseModule(module, scene);
41 AvatarProfilesModule avatarProfiles = new AvatarProfilesModule();
42 avatarProfiles.Initialise(scene);
43 scene.AddModule(avatarProfiles.GetName(), avatarProfiles);
44 LoadedModules.Add(avatarProfiles);
45 39
46 this.LoadRegionModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene); 40 this.LoadRegionModule("OpenSim.Region.ExtensionsScriptModule.dll", "ExtensionsScriptingModule", scene);
47 41
48 string lslPath = System.IO.Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); 42 string lslPath = System.IO.Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine.DotNetEngine.dll");
49 this.LoadRegionModule(lslPath, "LSLScriptingModule", scene); 43 this.LoadRegionModule(lslPath, "LSLScriptingModule", scene);
44
50 } 45 }
51 46
47
52 public void LoadDefaultSharedModules(string exceptModules) 48 public void LoadDefaultSharedModules(string exceptModules)
53 { 49 {
54 DynamicTextureModule dynamicModule = new DynamicTextureModule(); 50 DynamicTextureModule dynamicModule = new DynamicTextureModule();
@@ -64,6 +60,13 @@ namespace OpenSim.Region.Environment
64 } 60 }
65 } 61 }
66 62
63 private void InitialiseModule(IRegionModule module, Scene scene)
64 {
65 module.Initialise(scene);
66 scene.AddModule(module.GetName(), module);
67 LoadedModules.Add(module);
68 }
69
67 /// <summary> 70 /// <summary>
68 /// Loads/initialises a Module instance that can be used by mutliple Regions 71 /// Loads/initialises a Module instance that can be used by mutliple Regions
69 /// </summary> 72 /// </summary>
@@ -84,9 +87,7 @@ namespace OpenSim.Region.Environment
84 IRegionModule module = this.LoadModule(dllName, moduleName); 87 IRegionModule module = this.LoadModule(dllName, moduleName);
85 if (module != null) 88 if (module != null)
86 { 89 {
87 module.Initialise(scene); 90 this.InitialiseModule(module, scene);
88 scene.AddModule(module.GetName(), module);
89 LoadedModules.Add(module);
90 } 91 }
91 } 92 }
92 93