aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 0661c65..8e8a0b6 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -126,14 +126,30 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
126 m_scriptModule.PostScriptEvent(script, "link_message", args); 126 m_scriptModule.PostScriptEvent(script, "link_message", args);
127 } 127 }
128 128
129 public void RegisterScriptInvocation(string fname, ScriptInvocation fcall, Type[] csig, Type rsig) 129 public void RegisterScriptInvocation(ScriptInvocation fcall)
130 { 130 {
131 lock (m_scriptInvocation) 131 lock (m_scriptInvocation)
132 { 132 {
133 m_scriptInvocation[fname] = new ScriptInvocationData(fname,fcall,csig,rsig); 133 ParameterInfo[] parameters = fcall.Method.GetParameters ();
134 Type[] parmTypes = new Type[parameters.Length];
135 for (int i = 0 ; i < parameters.Length ; i++)
136 parmTypes[i] = parameters[i].ParameterType;
137 m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType);
134 } 138 }
135 } 139 }
136 140
141 public ScriptInvocation[] GetScriptInvocationList()
142 {
143 List<ScriptInvocation> ret = new List<ScriptInvocation>();
144
145 lock (m_scriptInvocation)
146 {
147 foreach (ScriptInvocationData d in m_scriptInvocation.Values)
148 ret.Add(d.ScriptInvocationFn);
149 }
150 return ret.ToArray();
151 }
152
137 public string LookupModInvocation(string fname) 153 public string LookupModInvocation(string fname)
138 { 154 {
139 lock (m_scriptInvocation) 155 lock (m_scriptInvocation)