diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/ModuleLoader.cs (renamed from OpenSim/Region/Environment/ModuleLoader.cs) | 88 |
1 files changed, 8 insertions, 80 deletions
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Framework/ModuleLoader.cs index f06fa0f..d393919 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Framework/ModuleLoader.cs | |||
@@ -31,18 +31,10 @@ using System.IO; | |||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Framework.Interfaces; |
35 | using OpenSim.Region.Environment.Modules.Agent.AssetTransaction; | 35 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Region.Environment.Modules.Avatar.Chat; | ||
37 | using OpenSim.Region.Environment.Modules.Avatar.InstantMessage; | ||
38 | using OpenSim.Region.Environment.Modules.Scripting.DynamicTexture; | ||
39 | using OpenSim.Region.Environment.Modules.Scripting.LoadImageURL; | ||
40 | using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; | ||
41 | using OpenSim.Region.Environment.Scenes; | ||
42 | 36 | ||
43 | //TODO: Why do we reference InstantMessageModule here? | 37 | namespace OpenSim.Region.Framework |
44 | |||
45 | namespace OpenSim.Region.Environment | ||
46 | { | 38 | { |
47 | public class ModuleLoader | 39 | public class ModuleLoader |
48 | { | 40 | { |
@@ -81,83 +73,19 @@ namespace OpenSim.Region.Environment | |||
81 | return modules; | 73 | return modules; |
82 | } | 74 | } |
83 | 75 | ||
84 | public void LoadDefaultSharedModules() | 76 | public void LoadDefaultSharedModule(IRegionModule module) |
85 | { | 77 | { |
86 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); | 78 | if (m_loadedSharedModules.ContainsKey(module.Name)) |
87 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) | ||
88 | { | ||
89 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); | ||
90 | } | ||
91 | else | ||
92 | { | ||
93 | m_loadedSharedModules.Add(dynamicModule.Name, dynamicModule); | ||
94 | } | ||
95 | |||
96 | // ChatModule chat = new ChatModule(); | ||
97 | // if (m_loadedSharedModules.ContainsKey(chat.Name)) | ||
98 | // { | ||
99 | // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); | ||
100 | // } | ||
101 | // else | ||
102 | // { | ||
103 | // m_loadedSharedModules.Add(chat.Name, chat); | ||
104 | // } | ||
105 | |||
106 | InstantMessageModule imMod = new InstantMessageModule(); | ||
107 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) | ||
108 | { | 79 | { |
109 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); | 80 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module not added!", module.Name); |
110 | } | 81 | } |
111 | else | 82 | else |
112 | { | 83 | { |
113 | m_loadedSharedModules.Add(imMod.Name, imMod); | 84 | m_loadedSharedModules.Add(module.Name, module); |
114 | } | ||
115 | |||
116 | LoadImageURLModule loadMod = new LoadImageURLModule(); | ||
117 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) | ||
118 | { | ||
119 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | m_loadedSharedModules.Add(loadMod.Name, loadMod); | ||
124 | } | ||
125 | |||
126 | // AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); | ||
127 | // if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) | ||
128 | // { | ||
129 | // m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); | ||
130 | // } | ||
131 | // else | ||
132 | // { | ||
133 | // m_loadedSharedModules.Add(avatarFactory.Name, avatarFactory); | ||
134 | // } | ||
135 | |||
136 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); | ||
137 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) | ||
138 | { | ||
139 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); | ||
140 | } | ||
141 | else | ||
142 | { | ||
143 | m_loadedSharedModules.Add(xmlRpcMod.Name, xmlRpcMod); | ||
144 | } | ||
145 | //TextureDownloadModule textureModule = new TextureDownloadModule(); | ||
146 | |||
147 | //LoadedSharedModules.Add(textureModule.Name, textureModule); | ||
148 | |||
149 | AssetTransactionModule transactionsModule = new AssetTransactionModule(); | ||
150 | if (m_loadedSharedModules.ContainsKey(transactionsModule.Name)) | ||
151 | { | ||
152 | m_log.ErrorFormat("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", transactionsModule.Name, "TransactionModule"); | ||
153 | } | ||
154 | else | ||
155 | { | ||
156 | m_loadedSharedModules.Add(transactionsModule.Name, transactionsModule); | ||
157 | } | 85 | } |
158 | |||
159 | } | 86 | } |
160 | 87 | ||
88 | |||
161 | public void InitialiseSharedModules(Scene scene) | 89 | public void InitialiseSharedModules(Scene scene) |
162 | { | 90 | { |
163 | foreach (IRegionModule module in m_loadedSharedModules.Values) | 91 | foreach (IRegionModule module in m_loadedSharedModules.Values) |