aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs16
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
index ed71a95..a76ffde 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections.Generic;
30using OpenMetaverse; 31using OpenMetaverse;
31 32
32namespace OpenSim.Region.Framework.Interfaces 33namespace OpenSim.Region.Framework.Interfaces
@@ -70,6 +71,7 @@ namespace OpenSim.Region.Framework.Interfaces
70 /// For constants 71 /// For constants
71 void RegisterConstant(string cname, object value); 72 void RegisterConstant(string cname, object value);
72 object LookupModConstant(string cname); 73 object LookupModConstant(string cname);
74 Dictionary<string, object> GetConstants();
73 75
74 // For use ONLY by the script API 76 // For use ONLY by the script API
75 void RaiseEvent(UUID script, string id, string module, string command, string key); 77 void RaiseEvent(UUID script, string id, string module, string command, string key);
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 705a847..c5c96a9 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -302,6 +302,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
302 return null; 302 return null;
303 } 303 }
304 304
305 /// <summary>
306 /// Get all registered constants
307 /// </summary>
308 public Dictionary<string, object> GetConstants()
309 {
310 Dictionary<string, object> ret = new Dictionary<string, object>();
311
312 lock (m_constants)
313 {
314 foreach (KeyValuePair<string, object> kvp in m_constants)
315 ret[kvp.Key] = kvp.Value;
316 }
317
318 return ret;
319 }
320
305#endregion 321#endregion
306 322
307 } 323 }