diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 98396ff..dc54c3f 100644 --- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -361,6 +361,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms | |||
361 | return null; | 361 | return null; |
362 | } | 362 | } |
363 | 363 | ||
364 | /// <summary> | ||
365 | /// Get all registered constants | ||
366 | /// </summary> | ||
367 | public Dictionary<string, object> GetConstants() | ||
368 | { | ||
369 | Dictionary<string, object> ret = new Dictionary<string, object>(); | ||
370 | |||
371 | lock (m_constants) | ||
372 | { | ||
373 | foreach (KeyValuePair<string, object> kvp in m_constants) | ||
374 | ret[kvp.Key] = kvp.Value; | ||
375 | } | ||
376 | |||
377 | return ret; | ||
378 | } | ||
379 | |||
364 | #endregion | 380 | #endregion |
365 | 381 | ||
366 | } | 382 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index 93930ce..70ff954 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | 32 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
@@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
131 | /// <param name="cname">Name of constant</param> | 132 | /// <param name="cname">Name of constant</param> |
132 | /// <returns>Value of constant or null if none found.</returns> | 133 | /// <returns>Value of constant or null if none found.</returns> |
133 | object LookupModConstant(string cname); | 134 | object LookupModConstant(string cname); |
135 | Dictionary<string, object> GetConstants(); | ||
134 | 136 | ||
135 | // For use ONLY by the script API | 137 | // For use ONLY by the script API |
136 | void RaiseEvent(UUID script, string id, string module, string command, string key); | 138 | void RaiseEvent(UUID script, string id, string module, string command, string key); |