aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorHomer Horwitz2009-04-13 21:23:24 +0000
committerHomer Horwitz2009-04-13 21:23:24 +0000
commitb717f991ede7f20fea4a3c331606a318f3300cb5 (patch)
treeb4081e882c3b81a6ec1632a03eb146b0c42bb050 /OpenSim/Region
parentFix ordering of operations: First initialize everything, then add regions (diff)
downloadopensim-SC_OLD-b717f991ede7f20fea4a3c331606a318f3300cb5.zip
opensim-SC_OLD-b717f991ede7f20fea4a3c331606a318f3300cb5.tar.gz
opensim-SC_OLD-b717f991ede7f20fea4a3c331606a318f3300cb5.tar.bz2
opensim-SC_OLD-b717f991ede7f20fea4a3c331606a318f3300cb5.tar.xz
Remove m_moduleCommands. It wasn't used anywhere; probably a left-over from before ICommander times
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs39
1 files changed, 8 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 42f3d97..89b5d77 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -78,11 +78,6 @@ namespace OpenSim.Region.Framework.Scenes
78 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>(); 78 protected Dictionary<string, ICommander> m_moduleCommanders = new Dictionary<string, ICommander>();
79 79
80 /// <value> 80 /// <value>
81 /// The module commands available for this scene
82 /// </value>
83 protected Dictionary<string, ICommand> m_moduleCommands = new Dictionary<string, ICommand>();
84
85 /// <value>
86 /// Registered classes that are capable of creating entities. 81 /// Registered classes that are capable of creating entities.
87 /// </value> 82 /// </value>
88 protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>(); 83 protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>();
@@ -311,38 +306,20 @@ namespace OpenSim.Region.Framework.Scenes
311 lock (m_moduleCommanders) 306 lock (m_moduleCommanders)
312 { 307 {
313 m_moduleCommanders.Add(commander.Name, commander); 308 m_moduleCommanders.Add(commander.Name, commander);
314
315 lock (m_moduleCommands)
316 {
317 foreach (ICommand command in commander.Commands.Values)
318 {
319 if (m_moduleCommands.ContainsKey(command.Name))
320 {
321 m_log.ErrorFormat(
322 "[MODULES]: Module commander {0} tried to register the command {1} which has already been registered",
323 commander.Name, command.Name);
324 continue;
325 }
326
327 m_moduleCommands[command.Name] = command;
328 }
329 }
330 } 309 }
331 } 310 }
332 311
333 /// <summary> 312 /// <summary>
334 /// Get an available module command 313 /// Unregister a module commander and all its commands
335 /// </summary> 314 /// </summary>
336 /// <param name="commandName"></param> 315 /// <param name="name"></param>
337 /// <returns>The command if it was found, null if no command is available with that name</returns> 316 public void UnregisterModuleCommander(string name)
338 public ICommand GetCommand(string commandName)
339 { 317 {
340 lock (m_moduleCommands) 318 lock (m_moduleCommanders)
341 { 319 {
342 if (m_moduleCommands.ContainsKey(commandName)) 320 ICommander commander;
343 return m_moduleCommands[commandName]; 321 if (m_moduleCommanders.TryGetValue(name, out commander))
344 else 322 m_moduleCommanders.Remove(name);
345 return null;
346 } 323 }
347 } 324 }
348 325